view test/test_textfmt.py @ 4492:5d43b2a5eb69

test that announcement.txt is pure ASCII... ...required at least up to python2.5 by distutils. (Note tht doc/announcement.txt is the *old* announcement from the last release, I've changed it so that setup.py will work for now and to illustrate what needed to be changed).
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Wed, 20 Apr 2011 13:12:53 +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

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