[Checkins] SVN: z3c.autoinclude/trunk/src/z3c/autoinclude/README.txt narrowing in on the failure with another broken test: distributionForPackage is faulty and does not necessarily return the correct distribution for a namespaced package. most likely, __import__(ns_module).__file__ just returns the filepath to whatever module in the namespace happens to be first in sys.path, or something similarly unpredictable

Ethan Jucovy ejucovy at openplans.org
Fri Apr 18 18:19:06 EDT 2008


Log message for revision 85478:
  narrowing in on the failure with another broken test: distributionForPackage is faulty and does not necessarily return the correct distribution for a namespaced package. most likely, __import__(ns_module).__file__ just returns the filepath to whatever module in the namespace happens to be first in sys.path, or something similarly unpredictable

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

-=-
Modified: z3c.autoinclude/trunk/src/z3c/autoinclude/README.txt
===================================================================
--- z3c.autoinclude/trunk/src/z3c/autoinclude/README.txt	2008-04-18 21:52:23 UTC (rev 85477)
+++ z3c.autoinclude/trunk/src/z3c/autoinclude/README.txt	2008-04-18 22:19:06 UTC (rev 85478)
@@ -299,7 +299,6 @@
     >>> pprint(test_log)
     [u'foo has been loaded']
 
-
 ``base2`` is a namespace package. ``base2.plug`` is a package that
 defines a plugin for base2; it extends ``base2``s namespace.
 
@@ -312,3 +311,20 @@
     >>> dummy = xmlconfig.file(filename, package=base2)
     >>> pprint(test_log)
     [u'base2.plug has been loaded']
+
+
+=================
+Utility functions
+=================
+
+Though this isn't the best place for these tests, I don't want to
+extract out the testing infrastructure right now; so let's just
+test the z3c.autoinclude.utils module right here.
+
+distributionForPackage is a function that takes a module object
+and returns the setuptools distribution object that contains
+the module.
+
+    >>> from z3c.autoinclude.utils import distributionForPackage
+    >>> distributionForPackage(base2)
+    base2 0.0 (base2-0.0...egg)



More information about the Checkins mailing list