[Checkins] SVN: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_docutils.py Full coverage for z.c.docutils.wrap.
Tres Seaver
cvs-admin at zope.org
Wed May 9 20:23:42 UTC 2012
Log message for revision 125781:
Full coverage for z.c.docutils.wrap.
Changed:
U zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_docutils.py
-=-
Modified: zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_docutils.py
===================================================================
--- zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_docutils.py 2012-05-09 20:23:35 UTC (rev 125780)
+++ zope.configuration/branches/tseaver-test_cleanup/src/zope/configuration/tests/test_docutils.py 2012-05-09 20:23:39 UTC (rev 125781)
@@ -22,9 +22,23 @@
from zope.configuration.docutils import wrap
return wrap(*args, **kw)
- # TODO: coverage
+ def test_empty(self):
+ self.assertEqual(self._callFUT(''), '\n\n')
+ def test_only_whitespace(self):
+ self.assertEqual(self._callFUT(' \t\n\r'), '\n\n')
+ def test_single_paragraphs(self):
+ self.assertEqual(
+ self._callFUT('abcde fghij klmno pqrst uvwxy', 10, 3),
+ ' abcde\n fghij\n klmno\n pqrst\n uvwxy\n\n')
+
+ def test_multiple_paragraphs(self):
+ self.assertEqual(
+ self._callFUT('abcde fghij klmno\n\npqrst uvwxy', 10, 3),
+ ' abcde\n fghij\n klmno\n\n pqrst\n uvwxy\n\n')
+
+
class Test_makeDocStructures(unittest.TestCase):
def _callFUT(self, *args, **kw):
More information about the checkins
mailing list