Closedown

This commit is contained in:
2019-12-11 15:44:03 +01:00
parent d70554860a
commit a093df863b

View File

@@ -509,12 +509,8 @@ class TestLoader:
def loadTestsFromModule(self, module):
"""Return a suite of all tests cases contained in the given module"""
tests = []
print module
print dir(module)
#for name in dir(module):
for name in globals().keys():
#obj = getattr(module, name)
obj = globals()[name]
for name in dir(module):
obj = getattr(module, name)
if (isinstance(obj, (type, types.ClassType)) and
issubclass(obj, TestCase)):
tests.append(self.loadTestsFromTestCase(obj))