[Checkins] SVN: zope.testing/branches/3.5/s Added the last missing test file from the patch

Marius Gedminas marius at pov.lt
Fri Aug 1 08:26:22 EDT 2008


Log message for revision 89130:
  Added the last missing test file from the patch
  http://launchpadlibrarian.net/15574471/zope.testing.patch
  
  

Changed:
  U   zope.testing/branches/3.5/setup.py
  A   zope.testing/branches/3.5/src/zope/testing/testrunner-package-normalization.txt

-=-
Modified: zope.testing/branches/3.5/setup.py
===================================================================
--- zope.testing/branches/3.5/setup.py	2008-08-01 12:26:07 UTC (rev 89129)
+++ zope.testing/branches/3.5/setup.py	2008-08-01 12:26:21 UTC (rev 89130)
@@ -71,7 +71,7 @@
 
 setup(
     name='zope.testing',
-    version='3.5.3',
+    version='3.5.4dev',
     url='http://www.python.org/pypi/zope.testing',
     license='ZPL 2.1',
     description='Zope testing framework, including the testrunner script.',

Added: zope.testing/branches/3.5/src/zope/testing/testrunner-package-normalization.txt
===================================================================
--- zope.testing/branches/3.5/src/zope/testing/testrunner-package-normalization.txt	                        (rev 0)
+++ zope.testing/branches/3.5/src/zope/testing/testrunner-package-normalization.txt	2008-08-01 12:26:21 UTC (rev 89130)
@@ -0,0 +1,49 @@
+Package normalization
+=====================
+
+For backward compatibility, the testrunner allows directory paths
+to be used as arguments to its ``--package`` option.
+Such a directory path is normalized by ``normalizePackage`` into
+a Python dotted module path. Of course, this operation is tricky
+and indeed caused bad normalizations in a buildout environment
+where development eggs have been created with ``ZopeSkel``.
+
+This test and its supporting directory
+``packagenormalization`` partly reproduces the environment
+build by ``ZopeSkel`` and checks for correct normalization
+in this case.
+It is quite likely, however, that the normalization has
+considerably more bugs. We probably should get rid of it...
+
+Let's set the path to our problematic directory:
+
+>>> from os.path import join
+>>> pd = join(this_directory, 'packagenormalization')
+
+The following setup is usually done by the ``buildout`` development egg
+magic for a development egg in ``packagenormalization``.
+
+>>> from sys import path
+>>> path.insert(0, pd)
+
+When the problem occurs, we are in the same directory as
+the development egg. Emulate this.
+
+>>> from os import chdir
+>>> chdir(this_directory)
+
+Defaults like this are set by ``collective.recipe.z2testrunner``
+
+>>> defaults = [
+...   '--test-path',  pd,
+...   ]
+
+And now let the testrunner run
+
+>>> from zope.testing import testrunner
+>>> testrunner.run(defaults, 'test --package packagenormalization'.split())
+    Running unit tests:
+      Ran 1 tests with 0 failures and 0 errors in 0.000 seconds.
+    False
+
+


Property changes on: zope.testing/branches/3.5/src/zope/testing/testrunner-package-normalization.txt
___________________________________________________________________
Name: svn:eol-style
   + native



More information about the Checkins mailing list