[Checkins] SVN: z3c.autoinclude/trunk/src/z3c/autoinclude/README.txt flesh out tests for distributionForPackage, and document them.

Ethan Jucovy ejucovy at openplans.org
Sat Apr 19 16:10:44 EDT 2008


Log message for revision 85491:
  flesh out tests for distributionForPackage, and document them.

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-19 20:03:46 UTC (rev 85490)
+++ z3c.autoinclude/trunk/src/z3c/autoinclude/README.txt	2008-04-19 20:10:42 UTC (rev 85491)
@@ -325,6 +325,26 @@
 and returns the setuptools distribution object that contains
 the module.
 
+It should find the correct distribution for a package whose namespace
+is extended by other packages in the environment::
     >>> from z3c.autoinclude.utils import distributionForPackage
     >>> distributionForPackage(base2)
     base2 0.0 (...base2-0.0...egg)
+
+It should also find the correct distribution for namespace packages,
+even if the namespace being extended is a module defined in another
+package in the environment::
+    >>> import base2.plug
+    >>> distributionForPackage(base2.plug)
+    base2-plug 0.0 (...base2_plug-0.0...egg)
+
+While we're at it, it should also find the correct distribution for
+packages whose distribution name has no bearing on the name of the
+package contained within it::
+    >>> import basepackage
+    >>> distributionForPackage(basepackage)
+    BasePackage 0.0 (...BasePackage-0.0...egg)
+
+    >>> import foo
+    >>> distributionForPackage(foo)
+    FooPackage 0.0 (...FooPackage-0.0...egg)



More information about the Checkins mailing list