32
32
class TestUTextWrap(tests.TestCase):
34
34
def check_width(self, text, expected_width):
38
39
"Width of %r should be %d" % (text, expected_width))
41
42
self.check_width(_str_D, 8)
42
43
self.check_width(_str_SD, 13)
44
45
def check_cut(self, text, width, pos):
45
self.assertEqual((text[:pos], text[pos:]), utextwrap._cut(text, width))
47
self.assertEqual((text[:pos], text[pos:]), w._cut(text, width))