summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_csv.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-104265 Disallow instantiation of `_csv.Reader` and `_csv.Writer` ↵Miss Islington (bot)2023-05-081-1/+8
| | | | | | | | (GH-104266) (#104278) gh-104265 Disallow instantiation of `_csv.Reader` and `_csv.Writer` (GH-104266) (cherry picked from commit 06c2a4858b8806abc700a0471434067910db54ec) Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
* gh-65496: Correct wording on csv's skipinitialspace argument (GH-96170)Miss Islington (bot)2022-10-071-0/+5
| | | | | (cherry picked from commit 676d8ef3806758bcd1d3fd84a746c8a9b64480d0) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
* gh-95950: Add a test for both `csv.Dialect` and `kwargs` (GH-95951)Miss Islington (bot)2022-09-211-0/+28
| | | | | (cherry picked from commit 1c01bd28a0ec7e46e570a07d970c590b1809f8f1) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* bpo-20028: Empty escapechar/quotechar is not allowed for csv.Dialect (GH-28833)Dong-hee Na2021-10-111-1/+12
|
* bpo-27580: Add support of null characters in the csv module. (GH-28808)Serhiy Storchaka2021-10-091-5/+39
|
* bpo-20028: Improve error message of csv.Dialect when initializing (GH-28705)Dong-hee Na2021-10-091-1/+30
|
* bpo-43625: Enhance csv sniffer has_headers() to be more accurate (GH-26939)andrei kulakov2021-07-301-0/+36
|
* bpo-44630: Fix assertion errors in csv module (GH-27127)T. Wouters2021-07-131-0/+6
| | | | | | | | | | | | | Fix incorrect handling of exceptions when interpreting dialect objects in the csv module. Not clearing exceptions between calls to PyObject_GetAttrString() causes assertion failures in pydebug mode (or with assertions enabled). Add a minimal test that would've caught this (passing None as dialect, or any object that isn't a csv.Dialect subclass, which the csv module allows and caters to, even though it is not documented.) In pydebug mode, the test triggers the assertion failure in the old code. Contributed-By: T. Wouters [Google]
* bpo-28395: Remove unnecessary semicolons in tests (GH-26868)Dong-hee Na2021-06-231-1/+1
|
* bpo-44089: Allow subclassing of ``csv.Error`` (GH-26008)Ken Jin2021-05-121-0/+3
| | | | | * fix subclass error * Update 2021-05-09-22-52-34.bpo-44089.IoANsN.rst
* bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25145)Inada Naoki2021-04-041-28/+28
| | | | | | | | | | | | | | | | | | | * test_asyncio * test_bz2 * test_math * test_cmath * test_cmd_line * test_cmd_line_script * test_compile * test_contextlib * test_profile * ctypes/test/test_find * test_multiprocessing * test_configparser * test_csv * test_dbm_dumb * test_decimal * test_difflib * os.fdopen() calls io.text_encoding() to emit EncodingWarning for right place.
* bpo-12178: Fix escaping of escapechar in csv.writer() (GH-13710)Berker Peksag2020-09-201-0/+14
| | | Co-authored-by: Itay Elbirt <anotahacou@gmail.com>
* bpo-41338: Fix DeprecationWarning in tests (GH-21542)Inada Naoki2020-07-201-0/+2
|
* bpo-36346: Make using the legacy Unicode C API optional (GH-21437)Serhiy Storchaka2020-07-101-1/+1
| | | | Add compile time option USE_UNICODE_WCHAR_CACHE. Setting it to 0 makes the interpreter not using the wchar_t cache and the legacy Unicode C API.
* bpo-26407: Do not mask errors in csv. (GH-20536)Serhiy Storchaka2020-06-221-1/+19
| | | | | Unexpected errors in calling the __iter__ method are no longer masked by TypeError in csv.reader(), csv.writer.writerow() and csv.writer.writerows().
* bpo-27497: Add return value to csv.DictWriter.writeheader (GH-12306)Rémi Lapeyre2019-05-101-0/+6
| | | | | | csv.DictWriter.writeheader() now returns the return value of the underlying csv.Writer.writerow() method. Patch contributed by Ashish Nitin Patil.
* bpo-34197: Make _csv.Dialect attributes booleans. (GH-8440)Serhiy Storchaka2018-07-261-21/+19
| | | | Attributes skipinitialspace, doublequote and strict are now booleans instead of integers 0 or 1.
* bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601)Serhiy Storchaka2018-02-091-0/+10
| | | | Co-authored-by: Jake Davis <jcdavis@awedge.net>
* bpo-32255: Always quote a single empty field when write into a CSV file. (#4769)Licht Takeuchi2017-12-121-1/+20
| | | This allows to distinguish an empty row from a row consisting of a single empty field.
* Issue #18219: Optimize csv.DictWriter for large number of columns.INADA Naoki2016-10-211-0/+18
| | | | Patch by Mariatta Wijaya.
* Issue #27895: Strengthen the dict reader tests.Raymond Hettinger2016-08-301-0/+38
|
* Issue #27842: The csv.DictReader now returns rows of type OrderedDict.Raymond Hettinger2016-08-301-0/+16
|
* Issue #23277: Remove unused imports in tests.Serhiy Storchaka2016-04-241-3/+0
|
* Issue #23277: Remove unused sys and os importsBerker Peksag2016-04-241-1/+0
| | | | Patch by Jon Dufresne.
* Issue #22995: Instances of extension types with a state that aren'tSerhiy Storchaka2015-12-251-0/+13
|\ | | | | | | | | | | subclasses of list or dict and haven't implemented any pickle-related methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__, or __getstate__), can no longer be pickled. Including memoryview.
| * Issue #22995: Instances of extension types with a state that aren'tSerhiy Storchaka2015-12-251-0/+13
| | | | | | | | | | | | subclasses of list or dict and haven't implemented any pickle-related methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__, or __getstate__), can no longer be pickled. Including memoryview.
* | Issue #23883: Add missing APIs to __all__; patch by Jacek KołodziejMartin Panter2015-11-141-0/+6
|/
* Issue #21741: Update 147 test modules to use test discovery.Zachary Ware2015-04-131-7/+1
| | | | | | | I have compared output between pre- and post-patch runs of these tests to make sure there's nothing missing and nothing broken, on both Windows and Linux. The only differences I found were actually tests that were previously *not* run.
* Issue #23171: csv.Writer.writerow() now supports arbitrary iterables.Serhiy Storchaka2015-03-301-0/+8
|
* Check that failed writerow() doesn't produce change a file.Serhiy Storchaka2015-03-251-14/+16
|\
| * Check that failed writerow() doesn't produce change a file.Serhiy Storchaka2015-03-251-14/+16
| |
* | Issue #22076: Minor grammar fix.Berker Peksag2014-07-271-3/+3
| | | | | | | | Patch by Martin Matusiak.
* | Issue #18727: improve test coverage of the csv module by testing for ↵Antoine Pitrou2014-04-281-0/+10
|/ | | | | | DictWriter.writerows. Patch by Muhammad Jehanzeb.
* (Merge 3.3) Issue #18829: Add tests for the csv module for invalid charactersVictor Stinner2014-01-021-0/+14
|\ | | | | | | (delimiter, escapechar, quotechar)
| * Issue #18829: Add tests for the csv module for invalid characters (delimiter,Victor Stinner2014-01-021-0/+13
| | | | | | | | escapechar, quotechar)
* | Issue #18829: csv.Dialect() now checks type for delimiter, escapechar andSerhiy Storchaka2013-12-191-5/+39
|\ \ | |/ | | | | quotechar fields. Original patch by Vajrasky Kok.
| * Issue #18829: csv.Dialect() now checks type for delimiter, escapechar andSerhiy Storchaka2013-12-191-5/+39
| | | | | | | | quotechar fields. Original patch by Vajrasky Kok.
* | Merge: #19449: Handle non-string keys when generating 'fieldnames' error.R David Murray2013-11-191-0/+12
|\ \ | |/
| * #19449: Handle non-string keys when generating 'fieldnames' error.R David Murray2013-11-191-0/+12
| | | | | | | | | | | | | | csv was handling non-string keys fine except for the error message generated when a non-string key was not in 'fieldnames'. Fix by Tomas Grahn, full patch-with-test by Vajrasky Kok (tweaked slightly).
| * Issue #18702: All skipped tests now reported as skipped.Serhiy Storchaka2013-11-031-72/+71
| |
* | Issue #18702: All skipped tests now reported as skipped.Serhiy Storchaka2013-11-031-72/+71
| |
* | Merge #18155: Regex-escape delimiter, in case it is a regex special char.R David Murray2013-06-291-3/+39
|\ \ | |/
| * #18155: Regex-escape delimiter, in case it is a regex special char.R David Murray2013-06-291-3/+39
| | | | | | | | Patch by Vajrasky Kok, with slight modification to the tests by me.
* | #15927: Fix cvs.reader parsing of escaped \r\n with quoting off.R David Murray2013-03-201-0/+9
| | | | | | | | | | | | | | This fix means that such values are correctly roundtripped, since cvs.writer already does the correct escaping. Patch by Michael Johnson.
* | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-6/+6
|/
* Issue #16145: Support legacy strings in the _csv module.Stefan Krah2012-11-021-0/+11
|
* Issue #16013: Fix CSV Reader parsing issue with ending quote characters. ↵Senthil Kumaran2012-09-251-0/+9
| | | | Patch by Serhiy Storchaka.
* Fix wrong test code in test_csv (#10602)Éric Araujo2010-12-021-12/+7
|
* #5975: add unix_dialect to csv module.Georg Brandl2010-10-271-0/+9
|
* Issue #9308: Removed redundant coding cookies. Added tests forAlexander Belopolsky2010-10-151-1/+0
| | | | | importing encoded modules that do not depend on specific stdlib modules being encoded in a certain way.