Ejemplo n.º 1
0
    def test_from_csv_row_delimiter(self):
        raw_data = b'one\t2\tthree,four\r\n'

        data = from_csv_row(raw_data, delimiter='\t')

        self.assertEqual(data, ['one', '2', 'three,four'])
Ejemplo n.º 2
0
    def test_from_csv_row_encoding(self):
        raw_data = b'\xf8ne,2,"three,four"\r\n'

        data = from_csv_row(raw_data, encoding='latin-1')

        self.assertEqual(data, ['øne', '2', 'three,four'])
Ejemplo n.º 3
0
    def test_from_csv_row(self):
        raw_data = b'one,2,"three,four"\r\n'

        data = from_csv_row(raw_data)

        self.assertEqual(data, ['one', '2', 'three,four'])