Mercurial > p > roundup > code
view test/test_textfmt.py @ 4448:2784c239e6c8
clear the cache on commit for rdbms backends:
Don't carry over cached values from one transaction to the next (there
may be other changes from other transactions) see new ConcurrentDBTest
for a read-modify-update cycle that fails with the old caching
behavior.
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Fri, 22 Oct 2010 14:14:26 +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
