def test(): logger.disable() for name_in_module in dir(sys.modules[__name__]): testee = getattr(sys.modules[__name__], name_in_module) if not hasattr(testee, 'test') or not hasattr(testee.test, '__call__'): continue testee.test()
def test(): logger.disable() for name_in_module in dir(sys.modules[__name__]): testee = getattr(sys.modules[__name__], name_in_module) if not hasattr(testee, "test") or not hasattr(testee.test, "__call__"): continue testee.test()