def testReflowRowContentsWithWrapping(self): input = ['Foo\nbar', 'This line\nis spread\nout over\nfour lines.'] expect = ['Foo bar', 'This line is spread\nout over four lines.'] self.assertEqual(expect, reflow_row_contents(input, [10, 20])) input = ['Foo\nbar', 'This line\nis spread\nout over\nfour lines.'] expect = ['Foo bar', 'This\nline\nis\nspread\nout\nover\nfour\nlines.'] self.assertEqual(expect, reflow_row_contents(input, [10, 6]))
def testReflowRowContentsWithEnoughWidth(self): input = ['Foo\nbar', 'This line\nis spread\nout over\nfour lines.'] expect = ['Foo bar', 'This line is spread out over four lines.'] self.assertEqual(expect, reflow_row_contents(input, [99, 99]))