def test_long_many_strings_spaces(self): testvalue = 'The quick brown fox jumped over the lazy dog' self.assertEqual(wp2.wrap_text(testvalue, 12), ['The quick', 'brown fox', 'jumped over', 'the lazy dog'])
def test_long_one_string_spaces(self): testvalue = 'abc defghijklmnopq rstuvwxyzabcdefgh ij' self.assertEqual(wp2.wrap_text(testvalue, 10), ['abc defghi', 'jklmnopq', 'rstuvwxyza', 'bcdefgh ij'])
def test_short_string_ret_same(self): testvalue = 'gattaca' self.assertEqual(wp2.wrap_text(testvalue, 10), 'gattaca')
def test_long_string_ret_chopped(self): testvalue = 'abcdefghijklmnopqrstuvwxyzabcdefghij' self.assertEqual(wp2.wrap_text(testvalue, 10), ['abcdefghij', 'klmnopqrst', 'uvwxyzabcd', 'efghij'])
def test_empty_string_ret_empty(self): testvalue = '' self.assertEqual(wp2.wrap_text(testvalue, 10), '')