-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Open
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
When running HtmlDiff
on test_api_result.response.txt test_api_result.expected.txt (reported at jeffkaufman/icdiff#223) unchanged lines are being detected as changes. Here's the setup:
import difflib
a = open("test_api_result.response.txt").readlines()
b = open("test_api_result.expected.txt").readlines()
with open("tmp.html", "w") as outf:
outf.write(difflib.HtmlDiff().make_file(a,b))
And the results: https://www.jefftk.com/html-diff-output-repro
I don't see these spurious deltas when running diff
:
$ diff test_api_result.*
31,32c31,32
< 'latitude': 1,
< 'longitude': 1,
---
> 'latitude': 1.0,
> 'longitude': 1.0,
40c40
< 'meeting_url': '',
---
> 'meeting_url': None,
77,78c77,78
< 'latitude': 1,
< 'longitude': 1,
---
> 'latitude': 1.0,
> 'longitude': 1.0,
86c86
< 'meeting_url': '',
---
> 'meeting_url': None,
...
CPython versions tested on:
3.13
Operating systems tested on:
macOS
Metadata
Metadata
Assignees
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error