/
opt
/
imh-python
/
lib
/
python3.9
/
site-packages
/
dogpile
/
testing
/
/opt/imh-python/lib/python3.9/site-packages/dogpile/testing
mkdir
upload
Name
Size
Mode
Actions
__pycache__/
-
0755
rm
assertions.py
870
0644
edit
dl
rm
fixtures.py
17368
0644
edit
dl
rm
__init__.py
221
0644
edit
dl
rm
Edit:
/opt/imh-python/lib/python3.9/site-packages/dogpile/testing/assertions.py
(870B)
import re import sys import time def eq_(a, b, msg=None): """Assert a == b, with repr messaging on failure.""" assert a == b, msg or "%r != %r" % (a, b) def is_(a, b, msg=None): """Assert a is b, with repr messaging on failure.""" assert a is b, msg or "%r is not %r" % (a, b) def ne_(a, b, msg=None): """Assert a != b, with repr messaging on failure.""" assert a != b, msg or "%r == %r" % (a, b) def assert_raises_message(except_cls, msg, callable_, *args, **kwargs): try: callable_(*args, **kwargs) assert False, "Callable did not raise an exception" except except_cls as e: assert re.search(msg, str(e)), "%r !~ %s" % (msg, e) def winsleep(): # sleep a for an amount of time # sufficient for windows time.time() # to change if sys.platform.startswith("win"): time.sleep(0.001)
Save
cmd:
run