Mario Corchero <marioc...@gmail.com> added the comment:

Makes sense!

I'd not align them though but that might be my view as I generally don't like 
aligning text like that.

Also if you feel that the exceptions read "weird" with the first sentence is 
empty, an option might be to say the calls don't match, to make it symmetric 
with the assert_calls message. Example:


Traceback (most recent call last):
  File "/tmp/bar.py", line 5, in <module>
    m.assert_called_with(2, 3)
  File 
"/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", 
line 827, in assert_called_with
    raise AssertionError(_error_message()) from cause
AssertionError: Expected call not found.
Expected call: mock(2, 3)
Actual call: mock(1, 2)

This way all error reports give you the issue in the first line of the message 
and further details in the next lines.

----------

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

Reply via email to