[Zope3-checkins] CVS: Zope3/src/zope/configuration/tests - basetestdirectivesxml.py:1.1.2.2 test_hookregistry.py:1.1.2.2 test_meta.py:1.1.2.2 test_metameta.py:1.1.2.2 test_metametafordocgen.py:1.1.2.2 test_multiplexml.py:1.1.2.2 test_names.py:1.1.2.2 test_xml.py:1.1.2.2
Jim Fulton
jim@zope.com
Mon, 23 Dec 2002 16:05:14 -0500
Update of /cvs-repository/Zope3/src/zope/configuration/tests
In directory cvs.zope.org:/tmp/cvs-serv7328/tests
Modified Files:
Tag: NameGeddon-branch
basetestdirectivesxml.py test_hookregistry.py test_meta.py
test_metameta.py test_metametafordocgen.py test_multiplexml.py
test_names.py test_xml.py
Log Message:
Got tests passing
=== Zope3/src/zope/configuration/tests/basetestdirectivesxml.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/configuration/tests/basetestdirectivesxml.py:1.1.2.1 Mon Dec 23 14:32:43 2002
+++ Zope3/src/zope/configuration/tests/basetestdirectivesxml.py Mon Dec 23 16:05:13 2002
@@ -54,7 +54,7 @@
xmlconfig(makeconfig(
'''<directive
name="doit"
- handler="Zope.Configuration.tests.Directives.doit" />''',
+ handler="zope.configuration.tests.directives.doit" />''',
'''<test:doit name="splat" />'''
))
self.assertEqual(done, ['splat'])
@@ -63,7 +63,7 @@
xmlconfig(makeconfig(
'''<directive
name="protectClass"
- handler="Zope.Configuration.tests.Directives.protectClass">
+ handler="zope.configuration.tests.directives.protectClass">
<subdirective name="protect" namespace="%s" />
</directive>''',
'''<test:protectClass
@@ -75,7 +75,7 @@
xmlconfig(makeconfig(
'''<directive
name="protectClass"
- handler="Zope.Configuration.tests.Directives.protectClass">
+ handler="zope.configuration.tests.directives.protectClass">
<subdirective name="protect" />
</directive>''',
'''<test:protectClass name=".Contact">
@@ -91,7 +91,7 @@
def testSubSubdirective(self):
xmlconfig(makeconfig(
'''<directive name="protectClass"
- handler="Zope.Configuration.tests.Directives.protectClass">
+ handler="zope.configuration.tests.directives.protectClass">
<subdirective name="subsub">
<subdirective name="subsub">
<subdirective name="subsub">
@@ -121,7 +121,7 @@
def testHandlerMethod(self):
xmlconfig(makeconfig(
'''<directive name="protectClass"
- handler="Zope.Configuration.tests.Directives.protectClass">
+ handler="zope.configuration.tests.directives.protectClass">
<subdirective
name="fish"
handler_method="protect" />
@@ -142,8 +142,8 @@
testxmlconfig,
makeconfig(
'''<directive
- name="protectClass"
- handler="Zope.Configuration.tests.Directives.protectClass">
+ name="protectClass"
+ handler="zope.configuration.tests.directives.protectClass">
<subdirective name="protect" namespace="%s" />
</directive>''',
'''<test:protectClass name=".Contact">
@@ -156,7 +156,7 @@
try: testxmlconfig(makeconfig(
'''<directive
name="protectClass"
- handler="Zope.Configuration.tests.Directives.protectClass">
+ handler="zope.configuration.tests.directives.protectClass">
<subdirective name="protect" namespace="%s" />
</directive>''',
'''<test:protectClass name=".Contact">
=== Zope3/src/zope/configuration/tests/test_hookregistry.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/configuration/tests/test_hookregistry.py:1.1.2.1 Mon Dec 23 14:32:43 2002
+++ Zope3/src/zope/configuration/tests/test_hookregistry.py Mon Dec 23 16:05:13 2002
@@ -23,21 +23,11 @@
class HookRegistryTest(unittest.TestCase):
-# def setUp(self):
-#
-# from Zope.Configuration.tests import Products_
-# self.old=sys.modules.get('ZopeProducts', None)
-# sys.modules['ZopeProducts']=Products_
-#
-# def tearDown(self):
-# old=self.old
-# if old is None: del sys.modules['ZopeProducts']
-# else: sys.modules['ZopeProducts']=self.old
-
def testAddHookable(self):
from zope.configuration.hookregistry import HookRegistry
- hookableAddr='Zope.Configuration.tests.hookTestDummyModule.dummyHookable'
+ hookableAddr = (
+ 'zope.configuration.tests.hooktestdummymodule.dummyHookable')
hookRegistry=HookRegistry()
hookRegistry.addHookable(hookableAddr)
@@ -50,7 +40,8 @@
from zope.configuration.hookregistry import HookRegistry
from zope.exceptions import DuplicationError
- hookableAddr='Zope.Configuration.tests.hookTestDummyModule.dummyHookable'
+ hookableAddr = (
+ 'zope.configuration.tests.hooktestdummymodule.dummyHookable')
hookRegistry=HookRegistry()
hookRegistry.addHookable(hookableAddr)
self.assertRaises(DuplicationError, hookRegistry.addHookable,
@@ -63,9 +54,10 @@
self.assertRaises(BadHookableError, hookRegistry.addHookable,
'foo.bar.this.should.not.resolve.anywhere')
self.assertRaises(BadHookableError, hookRegistry.addHookable,
- 'Zope')
- self.assertRaises(BadHookableError, hookRegistry.addHookable,
- 'Zope.Configuration.HookRegistry.HookRegistry.addHookable')
+ 'zope')
+ self.assertRaises(
+ BadHookableError, hookRegistry.addHookable,
+ 'zope.configuration.hookregistry.hookregistry.addHookable')
def testAddHook(self):
from zope.configuration.hookregistry import \
@@ -74,9 +66,9 @@
from zope.configuration.tests.hooktestdummymodule \
import associatedDummy
- dummyHook = 'Zope.Configuration.tests.testHookRegistry.dummyHook'
- suite = 'Zope.Configuration.tests.testHookRegistry.test_suite'
- hookableParent = 'Zope.Configuration.tests.hookTestDummyModule'
+ dummyHook = 'zope.configuration.tests.test_hookregistry.dummyHook'
+ suite = 'zope.configuration.tests.test_hookregistry.test_suite'
+ hookableParent = 'zope.configuration.tests.hooktestdummymodule'
hookableLast = 'dummyHookable'
hookableAddr = '%s.%s' % (hookableParent, hookableLast)
old = __import__(hookableParent, {}, {}, ('__dict__',)) # for cleanup
=== Zope3/src/zope/configuration/tests/test_meta.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/configuration/tests/test_meta.py:1.1.2.1 Mon Dec 23 14:32:43 2002
+++ Zope3/src/zope/configuration/tests/test_meta.py Mon Dec 23 16:05:13 2002
@@ -22,7 +22,7 @@
class MetaTest(CleanUp, unittest.TestCase):
def testImport(self):
- import Zope.Configuration.meta
+ import zope.configuration.meta
def testDirective(self):
from zope.configuration.meta \
=== Zope3/src/zope/configuration/tests/test_metameta.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/configuration/tests/test_metameta.py:1.1.2.1 Mon Dec 23 14:32:43 2002
+++ Zope3/src/zope/configuration/tests/test_metameta.py Mon Dec 23 16:05:13 2002
@@ -22,7 +22,7 @@
class Test(CleanUp, unittest.TestCase, directiveTests):
def setUp(self):
- XMLConfig('metameta.zcml', Zope.Configuration)()
+ XMLConfig('metameta.zcml', zope.configuration)()
def testDescription(self):
@@ -30,7 +30,7 @@
'''<directive
name="doit"
description="Something to Do"
- handler="Zope.Configuration.tests.Directives.doit" />''',
+ handler="zope.configuration.tests.directives.doit" />''',
'''<test:doit name="splat" />'''
))
self.assertEqual(done, ['splat'])
@@ -39,7 +39,7 @@
xmlconfig(makeconfig(
'''<directive
name="doit"
- handler="Zope.Configuration.tests.Directives.doit"
+ handler="zope.configuration.tests.directives.doit"
description="Something to Do"
>
<attribute
@@ -58,7 +58,7 @@
makeconfig(
'''<directive
name="doit"
- handler="Zope.Configuration.tests.Directives.doit"
+ handler="zope.configuration.tests.directives.doit"
>
<attribute
name="name"
=== Zope3/src/zope/configuration/tests/test_metametafordocgen.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/configuration/tests/test_metametafordocgen.py:1.1.2.1 Mon Dec 23 14:32:43 2002
+++ Zope3/src/zope/configuration/tests/test_metametafordocgen.py Mon Dec 23 16:05:13 2002
@@ -24,8 +24,8 @@
class Test(CleanUp, unittest.TestCase, directiveTests):
def setUp(self):
- XMLConfig('metameta.zcml', Zope.Configuration)()
- XMLConfig('metametaForDocgen.zcml', Zope.Configuration)()
+ XMLConfig('metameta.zcml', zope.configuration)()
+ XMLConfig('metametafordocgen.zcml', zope.configuration)()
def testDescription(self):
@@ -33,7 +33,7 @@
'''<directive
name="doit"
description="Just Do It"
- handler="Zope.Configuration.tests.Directives.doit" />''',
+ handler="zope.configuration.tests.directives.doit" />''',
'''<test:doit name="splat" />'''
))
self.assertEqual(done, ['splat'])
@@ -44,7 +44,7 @@
xmlconfig(makeconfig(
'''<directive
name="doit"
- handler="Zope.Configuration.tests.Directives.doit"
+ handler="zope.configuration.tests.directives.doit"
>
<attribute
name="name"
@@ -78,7 +78,7 @@
makeconfig(
'''<directive
name="doit"
- handler="Zope.Configuration.tests.Directives.doit"
+ handler="zope.configuration.tests.directives.doit"
>
<attribute
name="name"
=== Zope3/src/zope/configuration/tests/test_multiplexml.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/configuration/tests/test_multiplexml.py:1.1.2.1 Mon Dec 23 14:32:43 2002
+++ Zope3/src/zope/configuration/tests/test_multiplexml.py Mon Dec 23 16:05:13 2002
@@ -46,11 +46,11 @@
f1=tfile(template % (
'''<directive name="protectClass" namespace="%s"
- handler="Zope.Configuration.tests.Directives.protectClass">
+ handler="zope.configuration.tests.directives.protectClass">
<subdirective name="protect" namespace="%s" />
</directive>
<directive name="increment" namespace="%s"
- handler="Zope.Configuration.tests.Directives.increment">
+ handler="zope.configuration.tests.directives.increment">
</directive>
''' % (ns, ns, ns),
@@ -71,7 +71,7 @@
(".Contact", "splat", 'update2'),
])
- self.assertEquals(Zope.Configuration.tests.Directives.count, 3)
+ self.assertEquals(zope.configuration.tests.directives.count, 3)
def testConflicting(self):
f2=tfile(template % ('',
@@ -92,7 +92,7 @@
f1=tfile(template % (
'''<directive name="protectClass" namespace="%s"
- handler="Zope.Configuration.tests.Directives.protectClass">
+ handler="zope.configuration.tests.directives.protectClass">
<subdirective name="protect" namespace="%s" />
</directive>''' % (ns, ns),
'''
@@ -115,7 +115,7 @@
def testConflicting_in_same_location(self):
f1=tfile(template % (
'''<directive name="protectClass" namespace="%s"
- handler="Zope.Configuration.tests.Directives.protectClass">
+ handler="zope.configuration.tests.directives.protectClass">
<subdirective name="protect" namespace="%s" />
</directive>''' % (ns, ns),
'''
=== Zope3/src/zope/configuration/tests/test_names.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/configuration/tests/test_names.py:1.1.2.1 Mon Dec 23 14:32:43 2002
+++ Zope3/src/zope/configuration/tests/test_names.py Mon Dec 23 16:05:13 2002
@@ -22,64 +22,80 @@
def setUp(self):
- from Zope.Configuration.tests import Products_
- self.old=sys.modules.get('ZopeProducts', None)
- sys.modules['ZopeProducts']=Products_
+ from zope.configuration.tests import products_
+ self.old = sys.modules.get('zopeproducts', None)
+ sys.modules['zopeproducts'] = products_
def tearDown(self):
- old=self.old
- if old is None: del sys.modules['ZopeProducts']
- else: sys.modules['ZopeProducts']=self.old
+ old = self.old
+ if old is None:
+ del sys.modules['zopeproducts']
+ else:
+ sys.modules['zopeproducts']=self.old
def testProductPath(self):
from zope.configuration.name import resolve
- c=resolve('.Contact.')
+ c=resolve('.contact.contact.Contact')
self.assertEquals(c.n, 2)
- c=resolve('ZopeProducts.Contact.Contact.Contact')
+ c=resolve('zopeproducts.contact.contact.Contact')
self.assertEquals(c.n, 2)
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')
+ import zope.configuration.tests.contact
+ self.assertEquals(c, zope.configuration.tests.contact)
- c=resolve('Zope.Configuration.tests.Contact.')
+ c=resolve('zope.configuration.tests.contact.contact.Contact')
self.assertEquals(c.n, 1)
- c=resolve('Zope.Configuration.tests.Contact.Contact.Contact')
+ c=resolve('zope.configuration.tests.contact.contact.Contact')
self.assertEquals(c.n, 1)
def testNoDots(self):
from zope.configuration.name import resolve
- import Zope
- c=resolve('Zope')
+ import zope
+ c=resolve('zope')
- self.assertEquals(id(c), id(Zope))
+ self.assertEquals(id(c), id(zope))
def testPackage(self):
from zope.configuration.name import resolve
- c=resolve('Zope.Configuration.tests')
- import Zope.Configuration.tests
+ c=resolve('zope.configuration.tests')
+ import zope.configuration.tests
- self.assertEquals(id(c), id(Zope.Configuration.tests))
+ self.assertEquals(id(c), id(zope.configuration.tests))
nameSet={
- ('Zope.Configuration.tests','Noplace'):'Zope.Configuration.tests',
- ('Zope.Configuration.tests.tests','Noplace'):'Zope.Configuration.tests+',
- ('Zope.Configuration.tests.tests.tests','Noplace'):'Zope.Configuration.tests+',
- ('Zope.Configuration.tests.tests.tests.','Noplace'):'Zope.Configuration.tests+',
- ('Zope.Configuration.tests+','Noplace'):'Zope.Configuration.tests+',
- ('Zope.Configuration.tests.tests.tests+','Noplace'):'Zope.Configuration.tests+',
- ('Zope.Configuration.tests.','Noplace'):'Zope.Configuration.tests+',
- ('.tests','Zope.Configuration'):'Zope.Configuration.tests',
- ('.tests.tests','Zope.Configuration'):'Zope.Configuration.tests+',
- ('.tests.tests.tests','Zope.Configuration'):'Zope.Configuration.tests+',
- ('.tests.tests.tests.','Zope.Configuration'):'Zope.Configuration.tests+',
- ('.tests+','Zope.Configuration'):'Zope.Configuration.tests+',
- ('.tests.tests.tests+','Zope.Configuration'):'Zope.Configuration.tests+',
- ('.tests.','Zope.Configuration'):'Zope.Configuration.tests+'
+ ('zope.configuration.tests','Noplace'):
+ 'zope.configuration.tests',
+ ('zope.configuration.tests.tests','Noplace'):
+ 'zope.configuration.tests+',
+ ('zope.configuration.tests.tests.tests','Noplace'):
+ 'zope.configuration.tests+',
+ ('zope.configuration.tests.tests.tests.','Noplace'):
+ 'zope.configuration.tests+',
+ ('zope.configuration.tests+','Noplace'):
+ 'zope.configuration.tests+',
+ ('zope.configuration.tests.tests.tests+','Noplace'):
+ 'zope.configuration.tests+',
+ ('zope.configuration.tests.','Noplace'):
+ 'zope.configuration.tests+',
+ ('.tests','zope.configuration'):
+ 'zope.configuration.tests',
+ ('.tests.tests','zope.configuration'):
+ 'zope.configuration.tests+',
+ ('.tests.tests.tests','zope.configuration'):
+ 'zope.configuration.tests+',
+ ('.tests.tests.tests.','zope.configuration'):
+ 'zope.configuration.tests+',
+ ('.tests+','zope.configuration'):
+ 'zope.configuration.tests+',
+ ('.tests.tests.tests+','zope.configuration'):
+ 'zope.configuration.tests+',
+ ('.tests.','zope.configuration'):
+ 'zope.configuration.tests+'
}
def testNormalizedName(self):
=== Zope3/src/zope/configuration/tests/test_xml.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/configuration/tests/test_xml.py:1.1.2.1 Mon Dec 23 14:32:43 2002
+++ Zope3/src/zope/configuration/tests/test_xml.py Mon Dec 23 16:05:13 2002
@@ -53,7 +53,7 @@
file.write(
"""<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
<include
- package="Zope.Configuration.tests.Contact"
+ package="zope.configuration.tests.contact"
file="contact.zcml" />
</zopeConfigure>""")
file.flush()
@@ -68,7 +68,7 @@
file.write(
"""<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
<include
- package="Zope.Configuration.tests.*"
+ package="zope.configuration.tests.*"
file="contact.zcml" />
</zopeConfigure>""")
file.flush()
@@ -93,7 +93,7 @@
file1.write(
"""<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
<include
- package="Zope.Configuration.tests.Contact"
+ package="zope.configuration.tests.contact"
file="contact.zcml" />
</zopeConfigure>""")
file1.flush()