[Checkins] SVN: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py Full coverage for z.c.config.provides.
Tres Seaver
cvs-admin at zope.org
Wed May 9 20:23:14 UTC 2012
Log message for revision 125774:
Full coverage for z.c.config.provides.
Changed:
U zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.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-09 20:23:06 UTC (rev 125773)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_config.py 2012-05-09 20:23:10 UTC (rev 125774)
@@ -1612,9 +1612,20 @@
from zope.configuration.config import provides
return provides(*args, **kw)
- #TODO coverage
+ def test_w_multiple(self):
+ context = FauxContext()
+ self.assertRaises(ValueError, self._callFUT, context, 'one two')
+ def test_w_single(self):
+ _provided = []
+ def _provideFeature(feature):
+ _provided.append(feature)
+ context = FauxContext()
+ context.provideFeature = _provideFeature
+ self._callFUT(context, 'one')
+ self.assertEqual(_provided, ['one'])
+
class Test_toargs(unittest.TestCase):
def _callFUT(self, *args, **kw):
More information about the checkins
mailing list