def test_file_with_empty_row(self): stream = StringIO("first second\n\nhello world\n\n") self.assertEquals( [['first', 'second'], ['hello', 'world']], list(data_generator(stream)) )
def test_file_with_single_row(self): stream = StringIO("first second") self.assertEquals([['first', 'second']], list(data_generator(stream)))