view test/test_textfmt.py @ 5018:7cfd30cc8cfa

website: Reword code section, explain are why using SF and Mercurial to host our sources and link to unnoficial GitHub mirror
author anatoly techtonik <techtonik@gmail.com>
date Fri, 08 Jan 2016 18:04:32 +0300
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

Roundup Issue Tracker: http://roundup-tracker.org/