[Checkins] SVN: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_name.py Full coverage for z.c.name.getNormalizedName.
Tres Seaver
cvs-admin at zope.org
Wed May 9 23:46:49 UTC 2012
Log message for revision 125799:
Full coverage for z.c.name.getNormalizedName.
Changed:
U zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_name.py
-=-
Modified: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_name.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_name.py 2012-05-09 23:46:41 UTC (rev 125798)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_name.py 2012-05-09 23:46:46 UTC (rev 125799)
@@ -71,7 +71,35 @@
from zope.configuration.name import getNormalizedName
return getNormalizedName(*args, **kw)
+ def test_no_dots(self):
+ self.assertEqual(self._callFUT('os', None), 'os')
+ def test_one_dot(self):
+ self.assertEqual(self._callFUT('os.path', None), 'os.path')
+
+ def test_two_dots(self):
+ self.assertEqual(self._callFUT('os.path.join', None), 'os.path.join')
+
+ def test_relative(self):
+ self.assertEqual(self._callFUT('.join', 'os.path'), 'os.path.join')
+
+ def test_repeat_plus(self):
+ self.assertEqual(
+ self._callFUT('zope.configuration.tests.NamedForClass+', None),
+ 'zope.configuration.tests.NamedForClass+')
+
+ def test_repeat_dot(self):
+ self.assertEqual(
+ self._callFUT('zope.configuration.tests.NamedForClass.', None),
+ 'zope.configuration.tests.NamedForClass+')
+
+ def test_repeat_inferred(self):
+ self.assertEqual(
+ self._callFUT(
+ 'zope.configuration.tests.NamedForClass.NamedForClass', None),
+ 'zope.configuration.tests.NamedForClass+')
+
+
class Test_path(unittest.TestCase):
def _callFUT(self, *args, **kw):
More information about the checkins
mailing list