def test_handle_wrong_column_size(self): self.rows.pop() output = table.formatted_row(self.column_sizes, self.rows) self.assertEquals("|foo |bar | |", output[0])
def test_handle_word_wrap(self): self.rows[0].append("new") output = table.formatted_row(self.column_sizes, self.rows) self.assertEquals(len(output), 2) self.assertEquals("|foo |bar |baz |", output[0]) self.assertEquals("|new | | |", output[1])
def test_handle_columns(self): output = table.formatted_row(self.column_sizes, self.rows) self.assertEquals(len(output), 1) self.assertEquals("|foo |bar |baz |", output[0])