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 serhiy.storchaka
Recipients cjw296, lisroach, mariocj89, michael.foord, serhiy.storchaka, valkheim, xtreak
Date 2019-10-16.18:33:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1571250839.94.0.576241433386.issue38494@roundup.psfhosted.org>
In-reply-to
Content
Do you know why there is assertRaises(), but there is no assertNotRaises()?

Because assertNotRaises(Exception, callable, *args, **kwargs) would be equivalent to just callable(*args, **kwargs). Call the function, and if is raised an exception, the test will fail.

Similarly, there is no need of assert_not_called_with(). Just define a function which raises an exception when it is called with the specified arguments.
History
Date User Action Args
2019-10-16 18:33:59serhiy.storchakasetrecipients: + serhiy.storchaka, cjw296, michael.foord, lisroach, mariocj89, xtreak, valkheim
2019-10-16 18:33:59serhiy.storchakasetmessageid: <1571250839.94.0.576241433386.issue38494@roundup.psfhosted.org>
2019-10-16 18:33:59serhiy.storchakalinkissue38494 messages
2019-10-16 18:33:59serhiy.storchakacreate