mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
#5975: add unix_dialect to csv module.
This commit is contained in:
parent
347fe5ce3c
commit
7424dd359c
4 changed files with 32 additions and 2 deletions
|
@ -515,6 +515,15 @@ class TestEscapedExcel(TestCsvBase):
|
|||
def test_read_escape_fieldsep(self):
|
||||
self.readerAssertEqual('abc\\,def\r\n', [['abc,def']])
|
||||
|
||||
class TestDialectUnix(TestCsvBase):
|
||||
dialect = 'unix'
|
||||
|
||||
def test_simple_writer(self):
|
||||
self.writerAssertEqual([[1, 'abc def', 'abc']], '"1","abc def","abc"\n')
|
||||
|
||||
def test_simple_reader(self):
|
||||
self.readerAssertEqual('"1","abc def","abc"\n', [['1', 'abc def', 'abc']])
|
||||
|
||||
class QuotedEscapedExcel(csv.excel):
|
||||
quoting = csv.QUOTE_NONNUMERIC
|
||||
escapechar = '\\'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue