[Zope-Checkins] CVS: Zope3/lib/python/Zope/Configuration/tests - testNames.py:1.1.2.7

Jim Fulton jim@zope.com
Tue, 12 Feb 2002 16:30:58 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/Configuration/tests
In directory cvs.zope.org:/tmp/cvs-serv29682/tests

Modified Files:
      Tag: Zope-3x-branch
	testNames.py 
Log Message:
fixed bug in handling dotted package names (for include)

=== Zope3/lib/python/Zope/Configuration/tests/testNames.py 1.1.2.6 => 1.1.2.7 ===
         else: sys.modules['ZopeProducts']=self.old
         
-    def testProduct(self):
+    def testProductPath(self):
         from Zope.Configuration.name import resolve
 
-        c=resolve('.Contact')
+        c=resolve('.Contact.')
         self.assertEquals(c.n, 2)
         c=resolve('ZopeProducts.Contact.Contact.Contact')
         self.assertEquals(c.n, 2)
         
-    def testPackage(self):
+    def testPackagePath(self):
         from Zope.Configuration.name import resolve
 
         c=resolve('Zope.Configuration.tests.Contact')
+        import Zope.Configuration.tests.Contact
+        self.assertEquals(c, Zope.Configuration.tests.Contact)
+
+        c=resolve('Zope.Configuration.tests.Contact.')
         self.assertEquals(c.n, 1)
         c=resolve('Zope.Configuration.tests.Contact.Contact.Contact')
         self.assertEquals(c.n, 1)
@@ -42,6 +46,13 @@
         c=resolve('Zope')
 
         self.assertEquals(id(c), id(Zope))
+        
+    def testPackage(self):
+        from Zope.Configuration.name import resolve
+        c=resolve('Zope.App.ZMI')
+        import Zope.App.ZMI
+
+        self.assertEquals(id(c), id(Zope.App.ZMI))
 
 def test_suite():
     loader=unittest.TestLoader()