*** empty log message ***
This commit is contained in:
parent
5d2cf9d9dc
commit
2eba62574a
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
|
||||
def verify(assertion):
|
||||
"""
|
||||
verify() is intended to be used in place of assert where you
|
||||
wish to have the assertion checked, even in release (-O) code.
|
||||
"""
|
||||
if not assertion:
|
||||
print "\n\nverify failed:"
|
||||
import sys
|
||||
print " File \"%s\", line %d"%(
|
||||
sys._getframe(1).f_code.co_filename,
|
||||
sys._getframe(1).f_lineno)
|
||||
if 1:
|
||||
import pdb
|
||||
pdb.set_trace()
|
||||
raise AssertionError
|
||||
Loading…
Reference in New Issue