-
- Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
topic: rewriterelated to the assertion rewrite mechanismrelated to the assertion rewrite mechanism
Description
When running this snippet using pytest -v test.py, the full diff output confuses me and I believe the first item with a "-" is wrong there.
# ./test.py def test_(): m = [ "This is some dummy test which shows the strange way in which Pycharm" " displays the full diff." ] assert m == []Output:
FAILED [100%] test_fulldiff.py:0 (test_) ['This is some dummy test which shows the strange way in which Pycharm ' 'displays the full diff.'] != [] <Click to see difference> def test_(): m = [ "This is some dummy test which shows the strange way in which Pycharm" " displays the full diff." ] > assert m == [] E AssertionError: assert ['This is some dummy test which shows the strange way in which Pycharm displays the full diff.'] == [] E Left contains one more item: 'This is some dummy test which shows the strange way in which Pycharm displays the full diff.' E Full diff: E [ E - , E + 'This is some dummy test which shows the strange way in which Pycharm ' E + 'displays the full diff.', E ] test_fulldiff.py:6: AssertionError Compare with single-line string
FAILED [100%] test_fulldiff.py:0 (test_) ['This is some dummy test which shows the strange way in which Pycharm'] != [] Expected :[] Actual :['This is some dummy test which shows the strange way in which Pycharm'] <Click to see difference> def test_(): m = [ "This is some dummy test which shows the strange way in which Pycharm" ] > assert m == [] E AssertionError: assert ['This is some dummy test which shows the strange way in which Pycharm'] == [] E Left contains one more item: 'This is some dummy test which shows the strange way in which Pycharm' E Full diff: E - [] E + ['This is some dummy test which shows the strange way in which Pycharm'] test_fulldiff.py:5: AssertionError Details
OS: mac OS 13.2.1
Python: 3.9.6
Package Version -------------- ------- attrs 22.2.0 exceptiongroup 1.1.1 fulldiff 0.1.0 iniconfig 2.0.0 packaging 23.0 pip 22.3.1 pluggy 1.0.0 pytest 7.2.2 setuptools 67.0.0 tomli 2.0.1 wheel 0.38.4 Metadata
Metadata
Assignees
Labels
topic: rewriterelated to the assertion rewrite mechanismrelated to the assertion rewrite mechanism