[pypy-commit] pypy py3.5: test case to fix special case in escape char that was changed in py3.4

plan_rich pypy.commits at gmail.com
Sat Oct 8 11:57:24 EDT 2016


Author: Richard Plangger <planrichi at gmail.com>
Branch: py3.5
Changeset: r87627:a13c3317adb7
Date: 2016-10-08 17:56 +0200
http://bitbucket.org/pypy/pypy/changeset/a13c3317adb7/

Log:	test case to fix special case in escape char that was changed in
	py3.4

diff --git a/pypy/module/_csv/test/test_reader.py b/pypy/module/_csv/test/test_reader.py
--- a/pypy/module/_csv/test/test_reader.py
+++ b/pypy/module/_csv/test/test_reader.py
@@ -21,6 +21,12 @@
             w__read_test = staticmethod(w__read_test)
         cls.w__read_test = w__read_test
 
+    def test_escaped_char_quotes(self):
+        import _csv
+        from io import StringIO
+        r = _csv.reader(StringIO('a\\\nb,c\n'), quoting=_csv.QUOTE_NONE, escapechar='\\')
+        assert next(r) == ['a\nb', 'c']
+
     def test_simple_reader(self):
         self._read_test(['foo:bar\n'], [['foo', 'bar']], delimiter=':')
 


More information about the pypy-commit mailing list