bpo-24780: unittest assertEqual difference output foiled by newlines#11548
bpo-24780: unittest assertEqual difference output foiled by newlines#11548nanjekyejoannah wants to merge 3 commits intopython:masterfrom
Conversation
Lib/unittest/case.py
Outdated
There was a problem hiding this comment.
Thanks for the PR. line is a list here and this causes test failures due to TypeError. lines seems to be a better name since it makes me think it's a single line but it's actually a list of lines.
Lib/unittest/test/test_case.py
Outdated
There was a problem hiding this comment.
I think a better test would be to test the output diff like https://github.com/python/cpython/blob/e709c1be97a04156c628f534116a236b9581aa2f/Lib/unittest/test/test_case.py#L1122 and it should be testing the failure cases and asserting the Exception output string.
222a928 to
df4bdc9
Compare
6467b25 to
819b341
Compare
|
@tirkarthi I made the necessary updates to this PR. |
|
Thanks @nanjekyejoannah, tests should be fixed as noted in https://github.com/python/cpython/pull/11548/files#r247392463 . The tests are about the strings being equal and are not related to the issue. The actual tests should be about the diff output for the tests. |
|
closed this. Someone can open another PR. |
|
@nanjekyejoannah Why did you close the PR? |
I have created a fix for this issue and relevant tests.
https://bugs.python.org/issue24780