Mercurial > p > roundup > code
view test/test_textfmt.py @ 3869:16faac822fe5
Allow Multilinks to take any iterable
Change create_inner & set_inner to allow any iterable for
Multilinks.
Added a test to make sure they work and that we raise an exception
for non-iterables.
| author | Justus Pendleton <jpend@users.sourceforge.net> |
|---|---|
| date | Wed, 29 Aug 2007 16:40:20 +0000 |
| parents | f35ece8f8ff7 |
| children | 364c54991861 |
line wrap: on
line source
import unittest from roundup.support import wrap class WrapTestCase(unittest.TestCase): def testWrap(self): lorem = '''Lorem ipsum dolor sit amet, consectetuer adipiscing elit.''' wrapped = '''Lorem ipsum dolor sit amet, consectetuer adipiscing elit.''' self.assertEquals(wrap(lorem, 20), wrapped) def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(WrapTestCase)) return suite
