This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vabr2
Recipients vabr2
Date 2020-09-28.18:19:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Recently we cleaned up the following typos in mocks in unittests of our codebase:

* Wrong prefixes of mock asserts: asert/aseert/assrt -> assert
* Wrong attribute names around asserts: autospect/auto_spec -> autospec, set_spec -> spec_set

Especially the asserts are dangerous, because a misspelled assert_called will fail silently. We found real bugs in production code which were masked by a misspelled assert_called.

There is prior work done to report similar cases of assert misspellings with an AttributeError:, and adding new cases will be an easy change. I suppose that adding similar error signalling for the wrong argument names will not be much harder.

I'm prepared to implement it, if people of this project would be happy to have such checks.
Date User Action Args
2020-09-28 18:19:17vabr2setrecipients: + vabr2
2020-09-28 18:19:17vabr2setmessageid: <>
2020-09-28 18:19:17vabr2linkissue41877 messages
2020-09-28 18:19:17vabr2create