diff options
author | hut <hut@lavabit.com> | 2009-12-12 00:23:18 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-12-12 00:23:18 +0100 |
commit | 22449efdeaec4ae089a6461ab93700536b5ea1bd (patch) | |
tree | e50ea0bcd38f93bd3fa59f60086980f84e33282f /all_tests.py | |
parent | 649a69cb87af38f4bf1848085d49d1193f6e01ab (diff) | |
download | ranger-22449efdeaec4ae089a6461ab93700536b5ea1bd.tar.gz |
clean ups/fixes
Diffstat (limited to 'all_tests.py')
-rwxr-xr-x | all_tests.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/all_tests.py b/all_tests.py index b408b5de..dde73d53 100755 --- a/all_tests.py +++ b/all_tests.py @@ -1,11 +1,13 @@ #!/usr/bin/python3 -import unittest -from test import * +"""Run all the tests inside the test/ directory as a test suite.""" +if __name__ == '__main__': + import unittest + from test import * -tests = [] -for key, val in vars().copy().items(): - if key.startswith('tc_'): - tests.extend(v for k,v in vars(val).items() if type(v) == type) + tests = [] + for key, val in vars().copy().items(): + if key.startswith('tc_'): + tests.extend(v for k,v in vars(val).items() if type(v) == type) -suite = unittest.TestSuite(map(unittest.makeSuite, tests)) -unittest.TextTestRunner(verbosity=2).run(suite) + suite = unittest.TestSuite(map(unittest.makeSuite, tests)) + unittest.TextTestRunner(verbosity=2).run(suite) |