5 from os.path
import dirname, basename, isfile
16 if __name__ ==
'__main__':
17 directory = dirname(__file__)
20 modules = glob.glob(directory+
"/*.py")
21 __all__ = [
basename(f)[:-3]
for f
in modules
if isfile(f)]
22 suite = unittest.TestSuite()
24 for module
in __all__:
25 m = __import__(module)
28 realcl = getattr(m,cl)
29 if issubclass(realcl, unittest.TestCase):
31 except Exception
as e:
34 unittest.TextTestRunner().
run(suite)
static int run(int i, const char *arg)