Giampaolo Rodola' added the comment:

> But on python-ideas, G. Rodola noted the following
> assert \
>     1 == 0, \
>         "error"
[...]
> and requested that the *second* or *middle* line should be reported.

No, I was suggesting (assuming it's reasonably possible in terms of 
implementation) to report the whole block (3 lines) as-is. 
Note that the same would apply for functions.
For example this:

    self.assertEqual(1, 
                     2)

Currently prints:

    Traceback (most recent call last):
      File "foo.py", line 7, in test_foo
        2)
    AssertionError: 1 != 2

While instead it should:

    Traceback (most recent call last):
      File "foo.py", line 6, in test_foo
        self.assertEqual(1, 
                         2)
    AssertionError: 1 != 2

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12458>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to