[Checkins] SVN: z3c.testsetup/trunk/src/z3c/testsetup/tests/README_OLD.txt Remove encoding parameter description from old README. With switch

Uli Fouquet uli at gnufix.de
Sun Jul 25 10:21:56 EDT 2010


Log message for revision 115077:
  Remove encoding parameter description from old README. With switch
  from zope.testing.doctest to Python standard doctest module we have
  different doctests APIs for Python <= 2.4 and more recent Python
  versions. Python 2.4 doctest module simply does not support the
  ``encoding`` parameter when setting up doctest suites. We therefore
  cannot run the same doctest samples for Python 2.4 and newer Python
  versions.
  
  For README_OLD that does not matter very much, as it is merely a test
  for compatibility with really outdated API snippets.
  

Changed:
  U   z3c.testsetup/trunk/src/z3c/testsetup/tests/README_OLD.txt

-=-
Modified: z3c.testsetup/trunk/src/z3c/testsetup/tests/README_OLD.txt
===================================================================
--- z3c.testsetup/trunk/src/z3c/testsetup/tests/README_OLD.txt	2010-07-25 12:43:25 UTC (rev 115076)
+++ z3c.testsetup/trunk/src/z3c/testsetup/tests/README_OLD.txt	2010-07-25 14:21:56 UTC (rev 115077)
@@ -302,36 +302,6 @@
     Here the .foo file was registered as unit doctest and the .txt
     files as functional ones.
 
-
-- **encoding**:   
-
-    the encoding of testfiles. 'utf-8' by default. Setting this to `None`
-    means using the default value. We've hidden one doctest file, that
-    contains umlauts. If we set the encoding to `ascii`, we get an
-    error::
-
-      >>> test_suite = z3c.testsetup.register_all_tests(
-      ...     'z3c.testsetup.tests.cave',
-      ...     encoding='ascii')
-      >>> suite = test_suite()
-      Traceback (most recent call last):
-      ...
-      UnicodeDecodeError: 'ascii' codec can't decode ...: ordinal 
-      not in range(128)
-
-    While using 'latin-1' will work::
-
-      >>> test_suite = z3c.testsetup.register_all_tests(
-      ...     'z3c.testsetup.tests.cave',
-      ...     encoding='latin-1')
-      >>> suite = test_suite()
-      
-    No traceback here.
-
-    You can always overwrite an encoding setting for a certain file by
-    following PEP 0263 ( http://www.python.org/dev/peps/pep-0263/ ).
-
-
 - **checker**:
 
     An output checker for functional doctests. `None` by default. A



More information about the checkins mailing list