def test012_check_delimiter_sniffing(self): delims = [',', ';', ':', ' ', '\t'] inp = ("testmail10testmail.com{0}testname0{0}testsurname0\n" "[email protected]{0}δοκιμαστικόόνομα{0}δοκεπίθετο\n" "[email protected]{0}όνομα3{0}επίθετο3\n") delims_sniffed = [] for delim in delims: delimed_input = inp.format(delim) dialect = get_dialect(delimed_input) delims_sniffed.append(dialect.delimiter) self.assertEqual(delims_sniffed, delims)
def test012_check_delimiter_sniffing(self): delims = [',', ';', ':', ' ', '\t'] inp = ("testmail10testmail.com{0}testname0{0}testsurname0\n" "[email protected]{0}δοκιμαστικόόνομα{0}δοκεπίθετο\n" "[email protected]{0}όνομα3{0}επίθετο3\n") delims_sniffed = [] for delim in delims: delimed_input = inp.format(delim) dialect = get_dialect(delimed_input) delims_sniffed.append(dialect.delimiter) assert delims_sniffed == delims
def test013_check_default_delimiter_is_comma(self): inp = 'stringwithnodelimiters\nanotherstring' dialect = get_dialect(inp) assert dialect.delimiter == ','
def test013_check_default_delimiter_is_comma(self): inp = 'stringwithnodelimiters\nanotherstring' dialect = get_dialect(inp) self.assertEqual(dialect.delimiter, ',')