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 viniciusd
Recipients viniciusd
Date 2017-03-07.12:51:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488891092.02.0.36768274646.issue29747@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-03-07 12:51:32viniciusdsetrecipients: + viniciusd
2017-03-07 12:51:32viniciusdsetmessageid: <1488891092.02.0.36768274646.issue29747@psf.upfronthosting.co.za>
2017-03-07 12:51:31viniciusdlinkissue29747 messages
2017-03-07 12:51:31viniciusdcreate