New submission from Jason R. Coombs <jar...@jaraco.com>:

In [this job](https://travis-ci.org/jaraco/cmdix/jobs/491246158), a project is 
using assertEqual to compare two directory listings that don't match in the 
group. But the hint markers pointing to the mismatch are pointing at positions 
that match:

E       AssertionError: '--w-[50 chars]drwxrwxr-x 2 2000  2000    4096 
2019-02-10 14:[58 chars]oo\n' != '--w-[50 chars]drwxr-xr-x 2 2000  2000    4096 
2019-02-10 14:[58 chars]oo\n'
E         --w-r---wx 1 2000  2000  999999 2019-02-10 14:02 bar
E       - drwxrwxr-x 2 2000  2000    4096 2019-02-10 14:02 biz
E       ?  ---
E       + drwxr-xr-x 2 2000  2000    4096 2019-02-10 14:02 biz
E       ?        +++
E       - -rw-rw-r-- 1 2000  2000     100 2019-02-10 14:02 foo
E       ? ---
E       + -rw-r--r-- 1 2000  2000     100 2019-02-10 14:02 foo
E       ?        +++

As you can see, it's the 'group' section of the flags that differ between the 
left and right comparison, but the hints point at the 'user' section for the 
left side and the 'world' section for the right side, even though they match.

I observed this on Python 3.7.1. I haven't delved deeper to see if the issue 
exists on 3.7.2 or 3.8.

----------
components: Library (Lib)
messages: 335154
nosy: jaraco
priority: normal
severity: normal
status: open
title: unittest assertEqual reports incorrect location of mismatch

_______________________________________
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

Reply via email to