Message354814
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. |
|
Date |
User |
Action |
Args |
2019-10-16 18:33:59 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, cjw296, michael.foord, lisroach, mariocj89, xtreak, valkheim |
2019-10-16 18:33:59 | serhiy.storchaka | set | messageid: <1571250839.94.0.576241433386.issue38494@roundup.psfhosted.org> |
2019-10-16 18:33:59 | serhiy.storchaka | link | issue38494 messages |
2019-10-16 18:33:59 | serhiy.storchaka | create | |
|