Skip to content

Increase test coverage in csv module. #138621

Closed

Description

@JanEricNitschke

The csv (python) module currently has 10 untested lines:

Name         Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------
Lib/csv.py     262     10     96      8    95%   107->109, 164-165, 171, 255, 305->307, 312->314, 316-317, 327, 431, 434->443, 474, 511
--------------------------------------------------

Five of these are fairly easily testable. Specifically the Sniffer no delimiter error, DictReader fielname setter and case where fieldname determination from the first row fails because the iterator is exhausted.

Linked PRs

Activity

  1. added
    tests
    on Sep 7, 2025
  2. added
    type-feature
    on Sep 7, 2025
  3. added a commit that references this issue on Nov 12, 2025
  4. added a commit that references this issue on Nov 12, 2025
  5. gpshead commented on Nov 12, 2025

    @gpshead
    Member

    thanks!

  6. added a commit that references this issue on Nov 12, 2025
  7. added a commit that references this issue on Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    teststype-feature

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions