summaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2016-03-17 14:55:57 -0500
committerIan Cordasco <graffatcolmingov@gmail.com>2016-03-17 14:55:57 -0500
commit48b995fa62004e0595b4de9edb93f3ea2677a397 (patch)
tree1b2443d960d68eb10bd4e14b83be8f01115ab717 /run_tests.py
parent3da9fd3cb734f5d5a528036e3eb4f8e5e14fe63c (diff)
downloadflake8-48b995fa62004e0595b4de9edb93f3ea2677a397.tar.gz
Remove unnecessary and outdated test runner
Diffstat (limited to 'run_tests.py')
-rwxr-xr-xrun_tests.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/run_tests.py b/run_tests.py
deleted file mode 100755
index 09d6884..0000000
--- a/run_tests.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python
-
-import unittest
-import os
-import re
-import sys
-sys.path.insert(0, '.')
-
-TEST_DIR = 'flake8.tests'
-
-
-def collect_tests():
- # list files in directory tests/
- names = os.listdir(TEST_DIR.replace('.', '/'))
- regex = re.compile("(?!_+)\w+\.py$")
- join = '.'.join
- # Make a list of the names like 'tests.test_name'
- names = [join([TEST_DIR, f[:-3]]) for f in names if regex.match(f)]
- modules = [__import__(name, fromlist=[TEST_DIR]) for name in names]
- load_tests = unittest.defaultTestLoader.loadTestsFromModule
- suites = [load_tests(m) for m in modules]
- suite = suites.pop()
- for s in suites:
- suite.addTests(s)
- return suite
-
-if __name__ == "__main__":
- suite = collect_tests()
- res = unittest.TextTestRunner(verbosity=1).run(suite)
-
- # If it was successful, we don't want to exit with code 1
- raise SystemExit(not res.wasSuccessful())