File: test_textfmt.py

package info (click to toggle)
roundup 1.2.1-10%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 4,764 kB
  • ctags: 3,756
  • sloc: python: 30,296; sh: 1,497; perl: 23; makefile: 22
file content (17 lines) | stat: -rw-r--r-- 449 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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