Commit 947354e
gh-138621: Increase test coverage for csv.DictReader and csv.Sniffer (GH-138622)
* Increase test coverage for csv.DictReader and csv.Sniffer
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
* Address review comment
---------
(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>
1 parent 21c9c91 commit 947354e
1 file changed
+31
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
918 | 918 | | |
919 | 919 | | |
920 | 920 | | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
921 | 929 | | |
922 | 930 | | |
923 | 931 | | |
| |||
933 | 941 | | |
934 | 942 | | |
935 | 943 | | |
| 944 | + | |
936 | 945 | | |
937 | 946 | | |
938 | 947 | | |
| |||
1353 | 1362 | | |
1354 | 1363 | | |
1355 | 1364 | | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
1356 | 1378 | | |
1357 | 1379 | | |
1358 | 1380 | | |
| |||
1374 | 1396 | | |
1375 | 1397 | | |
1376 | 1398 | | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
1377 | 1404 | | |
1378 | 1405 | | |
1379 | 1406 | | |
| |||
1423 | 1450 | | |
1424 | 1451 | | |
1425 | 1452 | | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
1426 | 1457 | | |
1427 | 1458 | | |
1428 | 1459 | | |
| |||
0 commit comments