Replace assert from Python testcases with code that always runs.
assert code is sometimes not executed, eg when running python -O.
This commit is contained in:
parent
84b06fa21b
commit
cc7319f52f
5 changed files with 18 additions and 9 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import exception_classname
|
||||
|
||||
a = exception_classname.Exception()
|
||||
assert a.testfunc() == 42
|
||||
if a.testfunc() != 42:
|
||||
raise RuntimeError("Not 42!")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue