[New-bugs-announce] [issue35047] Better error messages un unittest.mock

Petter S report at bugs.python.org
Tue Oct 23 04:35:36 EDT 2018


New submission from Petter S <petter.strandmark at gmail.com>:

When developing unit tests with `unittest.mock`, it is common to see error messages like this:

    AssertionError: Expected 'info' to not have been called. Called 3 times.

It would be really helpful if those 3 calls were listed in the assertion error.

I am happy to add this if people agree it is a good thing.

----------
components: Library (Lib)
messages: 328292
nosy: Petter S
priority: normal
severity: normal
status: open
title: Better error messages un unittest.mock
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35047>
_______________________________________


More information about the New-bugs-announce mailing list