Exemplo n.º 1
0
 def __roundtrip(self, records, expect_diagnostics):
     file_obj = six.StringIO()
     db._write_csv_file(file_obj, records)
     file_obj.seek(0)
     read_records, diagnostics = db._parse_csv_file(file_obj)
     self.assertEqual(records, read_records)
     self.__assertDiag(diagnostics, expect_diagnostics)
Exemplo n.º 2
0
 def __roundtrip(self, records, expect_diagnostics):
     file_obj = StringIO.StringIO()
     db._write_csv_file(file_obj, records)
     file_obj.seek(0)
     read_records, diagnostics = db._parse_csv_file(file_obj)
     self.assertEqual(records, read_records)
     self.__assertDiag(diagnostics, expect_diagnostics)