[Checkins] SVN: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_zopeconfigure.py Full coverage for z.c.zopeconfigure.ZopeConfigure.
Tres Seaver
cvs-admin at zope.org
Wed May 9 23:47:02 UTC 2012
Log message for revision 125802:
Full coverage for z.c.zopeconfigure.ZopeConfigure.
Changed:
U zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_zopeconfigure.py
-=-
Modified: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_zopeconfigure.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_zopeconfigure.py 2012-05-09 23:46:55 UTC (rev 125801)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_zopeconfigure.py 2012-05-09 23:46:59 UTC (rev 125802)
@@ -25,7 +25,20 @@
def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw)
+ def test_ctor_wo_package(self):
+ zc = self._makeOne(Context())
+ self.assertEqual(zc.basepath, None)
+ def test_ctor_w_package(self):
+ import os
+ import zope.configuration.tests as zct
+ zc = self._makeOne(Context(), package=zct)
+ self.assertEqual(zc.basepath, os.path.dirname(zct.__file__))
+
+
+class Context(object):
+ basepath = None
+
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(ZopeConfigureTests),
More information about the checkins
mailing list