Message289161
Unittest provides us some assert methods, yet one is missing: the assertDoesNotRaise context.
When running tests, tests may end up as failures, successes or errors. It's worth noting that errors and failures are conceptually different, and that's the point on having an assertDoesNotRaise context, alike the assertRaises context.
This context would be useful, for example, when using Selenium client, it would be helpful to know if an alert popped, given there is no method to
check if there is an alert, we'd use a code like:
with assertDoesNotRaise(NoAlertPresentException):
driver.switch_to.alert.text
It is also important to mention that it makes explicit what we are testing. After all, explicit is better than implicit. |
|
Date |
User |
Action |
Args |
2017-03-07 12:51:32 | viniciusd | set | recipients:
+ viniciusd |
2017-03-07 12:51:32 | viniciusd | set | messageid: <1488891092.02.0.36768274646.issue29747@psf.upfronthosting.co.za> |
2017-03-07 12:51:31 | viniciusd | link | issue29747 messages |
2017-03-07 12:51:31 | viniciusd | create | |
|