Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:
Sorry to comment on a closed issue. I see the following behavior with difflib.ndiff which is used under the hood by unittest. The strings that differ by '-' and 'w' generate different output compared to 'a' and 'w'. I find the output for diff using '-' and 'w' little confusing and is this caused due to '-' which is also used as a marker in difflib? $ ./python.exe Python 3.8.0a1+ (heads/master:8a03ff2ff4, Feb 9 2019, 10:42:29) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import difflib >>> print(''.join(difflib.ndiff(["drwxrwxr-x 2 2000 2000\n"], ["drwxr-xr-x 2 >>> 2000 2000\n"]))) - drwxrwxr-x 2 2000 2000 ? --- + drwxr-xr-x 2 2000 2000 ? +++ >>> print(''.join(difflib.ndiff(["drwxrwxr-x 2 2000 2000\n"], ["drwxraxr-x 2 >>> 2000 2000\n"]))) - drwxrwxr-x 2 2000 2000 ? ^ + drwxraxr-x 2 2000 2000 ? ^ ---------- nosy: +xtreak _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35955> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com