summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_csv.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2003-09-06 19:52:12 (GMT)
committerSkip Montanaro <skip@pobox.com>2003-09-06 19:52:12 (GMT)
commit3f7a94824e502d4a66acb930fbfeb559392dd3d1 (patch)
treee09e10c449453d0e625ce60d607685e9e3b1acff /Lib/test/test_csv.py
parent60e868abd28f2e8aeaae24cd771f993796869b56 (diff)
downloadcpython-3f7a94824e502d4a66acb930fbfeb559392dd3d1.zip
cpython-3f7a94824e502d4a66acb930fbfeb559392dd3d1.tar.gz
cpython-3f7a94824e502d4a66acb930fbfeb559392dd3d1.tar.bz2
**kwds arg was missing from __init__ for Dict{Reader,Writer} classes.
will backport.
Diffstat (limited to 'Lib/test/test_csv.py')
-rw-r--r--Lib/test/test_csv.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py
index ba7cc09..d85c5b6 100644
--- a/Lib/test/test_csv.py
+++ b/Lib/test/test_csv.py
@@ -447,6 +447,13 @@ class TestDictFields(unittest.TestCase):
self.assertEqual(reader.next(), {"1": '1', "2": '2', "3": 'abc',
"4": '4', "5": '5', "6": '6'})
+ def test_read_semi_sep(self):
+ reader = csv.DictReader(["1;2;abc;4;5;6\r\n"],
+ fieldnames="1 2 3 4 5 6".split(),
+ delimiter=';')
+ self.assertEqual(reader.next(), {"1": '1', "2": '2', "3": 'abc',
+ "4": '4', "5": '5', "6": '6'})
+
class TestArrayWrites(unittest.TestCase):
def test_int_write(self):
import array