Skip to content

Increase test coverage in difflib module #138669

@JanEricNitschke

Description

@JanEricNitschke

The difflib module currently has 19 untested lines:

Name             Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------
Lib/difflib.py     677     19    328     21    96%   523, 697, 699, 865, 867, 871, 885-886, 974, 978, 1061, 1150->1157, 1170->1162, 1239->1246, 1252->1258, 1261->1238, 1263->1262, 1447, 1514-1516, 1526->1532, 1814-1815, 1981->1984, 2090-2091
------------------------------------------------------------
TOTAL              677     19    328     21    96%


Six of these are fairly easy to test, specifically the caching in difflib.SequenceMatcher, the "delete" and "insert" cases for difflib.Differ.compare, and the error conditions for difflib.get_close_matches and diifflib.restore

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions