[3.14] gh-138621: Increase test coverage for csv.DictReader and csv.Sniffer (GH-138622) #141436
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously there were no tests for the DictReader fieldnames
setter, the case where a StopIteration was encountered when trying
to determine the fieldnames from the content or the case where
Sniffer could not find a delimiter.
Revert whitespace change to comment
Add a test that csv.Sniffer.has_header checks up to 20 rows
Replace name and age with letter and offset
Co-authored-by: Bénédikt Tran 10796600+picnixz@users.noreply.github.com
(cherry picked from commit 0e88be6)
Co-authored-by: Jan-Eric Nitschke 47750513+JanEricNitschke@users.noreply.github.com
Co-authored-by: Bénédikt Tran 10796600+picnixz@users.noreply.github.com
Co-authored-by: Gregory P. Smith 68491+gpshead@users.noreply.github.com