Message335257
Thanks for the explanation. This seems to give the desired diff with charjunk=None passed to multiline string comparison helper. I am not sure how useful it would be to pass it to sequence and dict comparison that also use ndiff. I can open a PR if it's okay with the set of strings in the report as a test case. There are no test case failures in existing unittest folder test suite so this seems like a safe change to me.
# With patch charjunk=None
./python.exe ../backups/bpo35955_1.py
F
======================================================================
FAIL: test_foo (__main__.FooTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "../backups/bpo35955_1.py", line 6, in test_foo
self.assertEqual("drwxrwxr-x 2 2000 2000\n", "drwxr-xr-x 2 2000 2000\n")
AssertionError: 'drwxrwxr-x 2 2000 2000\n' != 'drwxr-xr-x 2 2000 2000\n'
- drwxrwxr-x 2 2000 2000
? ^
+ drwxr-xr-x 2 2000 2000
? ^
----------------------------------------------------------------------
Ran 1 test in 0.003s
FAILED (failures=1)
# Without patch
➜ cpython git:(master) ✗ python3.7 ../backups/bpo35955_1.py
F
======================================================================
FAIL: test_foo (__main__.FooTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "../backups/bpo35955_1.py", line 6, in test_foo
self.assertEqual("drwxrwxr-x 2 2000 2000\n", "drwxr-xr-x 2 2000 2000\n")
AssertionError: 'drwxrwxr-x 2 2000 2000\n' != 'drwxr-xr-x 2 2000 2000\n'
- drwxrwxr-x 2 2000 2000
? ---
+ drwxr-xr-x 2 2000 2000
? +++
----------------------------------------------------------------------
Ran 1 test in 0.002s
FAILED (failures=1) |
|
Date |
User |
Action |
Args |
2019-02-11 19:04:35 | xtreak | set | recipients:
+ xtreak, tim.peters, jaraco, chris.jerdonek |
2019-02-11 19:04:34 | xtreak | set | messageid: <1549911874.17.0.0638665239866.issue35955@roundup.psfhosted.org> |
2019-02-11 19:04:34 | xtreak | link | issue35955 messages |
2019-02-11 19:04:34 | xtreak | create | |
|