def test_empties(self): lines = empty_lines_to_whitespace(['', '']) self.assertSize(lines, 2) for line in lines: self.assertNotEqual(line, '') self.assertEqual(line.strip(), '') self.assertNotIn('\n', line)
def test_non_empties(self): original = ['line_1', 'line_2'] self.assertEqual(empty_lines_to_whitespace(original), original)