Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def test():
- import sys
- mod = sys.modules[__name__]
- testfuncs = [getattr(mod, name) for name in dir(mod) if name.startswith('test_')]
- [tf() for tf in sorted(testfuncs, key=lambda f:f.__code__.co_firstlineno)]
- print('ran %i tests' % len(testfuncs))
- test()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement