Ejemplo 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)
Ejemplo 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)
Ejemplo n.º 3
0
 def __parse(self, s, expect_records, expect_diagnostics):
     read_records, diagnostics = db._parse_csv_file(six.StringIO(s))
     self.__assertDiag(diagnostics, expect_diagnostics)
     self.assertEqual(expect_records, read_records)
Ejemplo n.º 4
0
 def __parse(self, s, expect_records, expect_diagnostics):
     read_records, diagnostics = db._parse_csv_file(StringIO.StringIO(s))
     self.__assertDiag(diagnostics, expect_diagnostics)
     self.assertEqual(expect_records, read_records)