[Checkins] SVN: grokcore.view/trunk/src/grokcore/view/tests/view/dirtemplatesonly Update tests.

Uli Fouquet uli at gnufix.de
Wed Feb 25 05:04:23 EST 2009


Log message for revision 97241:
  Update tests.

Changed:
  U   grokcore.view/trunk/src/grokcore/view/tests/view/dirtemplatesonly.py
  A   grokcore.view/trunk/src/grokcore/view/tests/view/dirtemplatesonly_templates/ignored.cache

-=-
Modified: grokcore.view/trunk/src/grokcore/view/tests/view/dirtemplatesonly.py
===================================================================
--- grokcore.view/trunk/src/grokcore/view/tests/view/dirtemplatesonly.py	2009-02-25 10:00:54 UTC (rev 97240)
+++ grokcore.view/trunk/src/grokcore/view/tests/view/dirtemplatesonly.py	2009-02-25 10:04:22 UTC (rev 97241)
@@ -1,7 +1,7 @@
 """
 A template directory may only contain recognized template files::
 
-  >>> from grokcore.view.testing import warn
+  >>> from grokcore.view.testing import warn, lastwarning
   >>> import warnings
   >>> saved_warn = warnings.warn
   >>> warnings.warn = warn
@@ -11,6 +11,21 @@
   ... UserWarning: File 'invalid.txt' has an unrecognized extension in
   directory '...dirtemplatesonly_templates'...
 
+Files ending with '.cache' are generated on the fly by some template
+engines. Although they provide no valid template filename extension,
+they are ignored.
+
+There is a 'template' ``ignored.cache`` in our template dir, which
+emits no warning::
+
+  >>> 'ignored.cache' in lastwarning
+  False
+
+The same applies to files and directories ending with '~' or starting
+with a dot ('.').
+
+Restore the warning machinery::
+
   >>> warnings.warn = saved_warn
 
 """

Added: grokcore.view/trunk/src/grokcore/view/tests/view/dirtemplatesonly_templates/ignored.cache
===================================================================
--- grokcore.view/trunk/src/grokcore/view/tests/view/dirtemplatesonly_templates/ignored.cache	                        (rev 0)
+++ grokcore.view/trunk/src/grokcore/view/tests/view/dirtemplatesonly_templates/ignored.cache	2009-02-25 10:04:22 UTC (rev 97241)
@@ -0,0 +1 @@
+This file should be ignored by the template finder.



More information about the Checkins mailing list