You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In testing, it is very useful to separate random exceptions thrown from code from actual test assertion failures (unittest, nose and friends go at this half way by categorizing failures vs. errors).
In some of the environments one would like to use a custom exception type for assertions, to prevent confusions from actual assert statements inside his or her code.
It would be nice to do something like:
import sure
...
with sure.set_assertion_class(MyAssertionError):
(2).should.be.a(str)
Of course this can also be a global setup function, but as a context/thread local it would be more flexible.
The text was updated successfully, but these errors were encountered:
In testing, it is very useful to separate random exceptions thrown from code from actual test assertion failures (unittest, nose and friends go at this half way by categorizing failures vs. errors).
In some of the environments one would like to use a custom exception type for assertions, to prevent confusions from actual assert statements inside his or her code.
It would be nice to do something like:
Of course this can also be a global setup function, but as a context/thread local it would be more flexible.
The text was updated successfully, but these errors were encountered: