pytest-dev / pytest-dev/pytest
assertion explanation cutoff takes beginnings of relevant lines for near identical contents
Open
Nobody has claimed this yet.
topic: rewrite
type: enhancement
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
AssertionError: assert '[metadata]\n... = LICENSES\n' == '[metadata]\n... = LICENSES\n'
E Skipping 38 identical leading characters in diff, use -v to show
E - cense_file = LICENSE
E - license_files = LICENSES
E ? --
E + cense_files = LICENSES
vs
E AssertionError: assert '[metadata]\n... = LICENSES\n' == '[metadata]\n... = LICENSES\n'
E [metadata]
E name = pkg
E version = 1.0
E - license_file = LICENSE
E license_files = LICENSES
with -v
we should enhance the heuristics so te diff doesn't turn out confusing
pytest 7.1.3
fedora 36
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported near-identical string assertion with pytest 7.1.3, comparing normal output with -v. Trace the assertion explanation and diff cutoff behavior from that reproduction; done means the shortened output preserves the relevant differing lines without the confusing truncation shown in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100