[Checkins] SVN: z3c.testsetup/trunk/src/z3c/testsetup/README.txt Disable encoding test.

Uli Fouquet uli at gnufix.de
Sun Jul 25 10:24:58 EDT 2010


Log message for revision 115078:
  Disable encoding test.
  
  It seems this has to be done as the doctest examples have to pass
  under different Python versions with different APIs. Python2.4 does
  not support the 'encoding' parameter for doctest setups. We leave a
  notice for readers, anyway.
  

Changed:
  U   z3c.testsetup/trunk/src/z3c/testsetup/README.txt

-=-
Modified: z3c.testsetup/trunk/src/z3c/testsetup/README.txt
===================================================================
--- z3c.testsetup/trunk/src/z3c/testsetup/README.txt	2010-07-25 14:21:56 UTC (rev 115077)
+++ z3c.testsetup/trunk/src/z3c/testsetup/README.txt	2010-07-25 14:24:57 UTC (rev 115078)
@@ -290,13 +290,25 @@
 
     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:
+    contains umlauts. If we set the encoding to ``ascii``, we will get
+    some `UnicodeDecodeError`.
 
-      >>> test_suite = z3c.testsetup.register_all_tests(
-      ...     'z3c.testsetup.tests.cave',
-      ...     encoding='ascii')
-      >>> suite = test_suite()
+
+    We cannot easily show that here, as this parameter is not
+    supported for Python 2.4 and all examples in here have to work
+    for each supported Python version.
+
+    .. note:: `encoding` parameter is not supported for Python 2.4.
+
+              You can pass the encoding parameter, but it will be
+              ignored when building test suites.
+
+    For Python >= 2.5 the result would look like this::
+
+      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



More information about the checkins mailing list