[Checkins] SVN: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_ Prep for coverage.
Tres Seaver
cvs-admin at zope.org
Tue May 8 01:18:55 UTC 2012
Log message for revision 125718:
Prep for coverage.
Changed:
U zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py
A zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_fields.py
A zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_name.py
A zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_stxdocs.py
-=-
Modified: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py 2012-05-08 01:18:46 UTC (rev 125717)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py 2012-05-08 01:18:51 UTC (rev 125718)
@@ -107,6 +107,21 @@
c.package = stub()
os.path.isabs(c.path('y/z'))
+ #TODO: coverage
+
+
+class ConfigurationAdapterRegistryTests(unittest.TestCase):
+
+ def _getTargetClass(self):
+ from zope.configuration.config import ConfigurationAdapterRegistry
+ return ConfigurationAdapterRegistry
+
+ def _makeOne(self, *args, **kw):
+ return self._getTargetClass()(*args, **kw)
+
+ #TODO: coverage
+
+
class ConfigurationMachineTests(unittest.TestCase):
def _getTargetClass(self):
@@ -155,8 +170,12 @@
'order': 0,
})
+ #TODO: coverage
+
+
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(ConfigurationContextTests),
+ unittest.makeSuite(ConfigurationAdapterRegistryTests),
unittest.makeSuite(ConfigurationMachineTests),
))
Added: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_fields.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_fields.py (rev 0)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_fields.py 2012-05-08 01:18:51 UTC (rev 125718)
@@ -0,0 +1,99 @@
+##############################################################################
+#
+# Copyright (c) 20!2 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Test zope.configuration.fields.
+"""
+import unittest
+
+
+class PythonIdentifierTests(unittest.TestCase):
+
+ def _getTargetClass(self):
+ from zope.configuration.config import PythonIdentifier
+ return PythonIdentifier
+
+ def _makeOne(self, *args, **kw):
+ return self._getTargetClass()(*args, **kw)
+
+
+class GlobalObjectTests(unittest.TestCase):
+
+ def _getTargetClass(self):
+ from zope.configuration.config import GlobalObject
+ return GlobalObject
+
+ def _makeOne(self, *args, **kw):
+ return self._getTargetClass()(*args, **kw)
+
+
+class GlobalIdentifierTests(unittest.TestCase):
+
+ def _getTargetClass(self):
+ from zope.configuration.config import GlobalIdentifier
+ return GlobalIdentifier
+
+ def _makeOne(self, *args, **kw):
+ return self._getTargetClass()(*args, **kw)
+
+
+class TokensTests(unittest.TestCase):
+
+ def _getTargetClass(self):
+ from zope.configuration.config import Tokens
+ return Tokens
+
+ def _makeOne(self, *args, **kw):
+ return self._getTargetClass()(*args, **kw)
+
+
+class PathTests(unittest.TestCase):
+
+ def _getTargetClass(self):
+ from zope.configuration.config import Path
+ return Path
+
+ def _makeOne(self, *args, **kw):
+ return self._getTargetClass()(*args, **kw)
+
+
+class BoolTests(unittest.TestCase):
+
+ def _getTargetClass(self):
+ from zope.configuration.config import Bool
+ return Bool
+
+ def _makeOne(self, *args, **kw):
+ return self._getTargetClass()(*args, **kw)
+
+
+class MessageIDTests(unittest.TestCase):
+
+ def _getTargetClass(self):
+ from zope.configuration.config import MessageID
+ return MessageID
+
+ def _makeOne(self, *args, **kw):
+ return self._getTargetClass()(*args, **kw)
+
+
+
+def test_suite():
+ return unittest.TestSuite((
+ unittest.makeSuite(PythonIdentifierTests),
+ unittest.makeSuite(GlobalObjectTests),
+ unittest.makeSuite(GlobalIdentifierTests),
+ unittest.makeSuite(TokensTests),
+ unittest.makeSuite(PathTests),
+ unittest.makeSuite(BoolTests),
+ unittest.makeSuite(MessageIDTests),
+ ))
Added: 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 (rev 0)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_name.py 2012-05-08 01:18:51 UTC (rev 125718)
@@ -0,0 +1,45 @@
+##############################################################################
+#
+# Copyright (c) 20!2 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Test zope.configuration.name
+"""
+import unittest
+
+
+class Test_resolve(unittest.TestCase):
+
+ def _callFUT(self, *args, **kw):
+ from zope.configuration.name import resolve
+ return resolve(*args, **kw)
+
+
+class Test_getNormalizedName(unittest.TestCase):
+
+ def _callFUT(self, *args, **kw):
+ from zope.configuration.name import getNormalizedName
+ return getNormalizedName(*args, **kw)
+
+
+class Test_path(unittest.TestCase):
+
+ def _callFUT(self, *args, **kw):
+ from zope.configuration.name import path
+ return path(*args, **kw)
+
+
+def test_suite():
+ return unittest.TestSuite((
+ unittest.makeSuite(Test_resolve),
+ unittest.makeSuite(Test_resolve),
+ unittest.makeSuite(Test_path),
+ ))
Added: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_stxdocs.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_stxdocs.py (rev 0)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_stxdocs.py 2012-05-08 01:18:51 UTC (rev 125718)
@@ -0,0 +1,31 @@
+##############################################################################
+#
+# Copyright (c) 20!2 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Test zope.configuration.stxdocs
+"""
+import unittest
+
+
+class Test_makedocs(unittest.TestCase):
+
+ def _callFUT(self, *args, **kw):
+ from zope.configuration.stxdocs import makedocs
+ return makedocs(*args, **kw)
+
+
+
+def test_suite():
+ return unittest.TestSuite((
+ unittest.makeSuite(Test_makedocs),
+ ))
+
More information about the checkins
mailing list