mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-28 13:42:37 +01:00
runtests: allow specifying files to test
This commit is contained in:
parent
46fab1cab7
commit
4b7ef44925
@ -11,7 +11,10 @@ suites = []
|
||||
|
||||
# Yay, import hacks!
|
||||
sys.path.append(os.path.join(os.getcwd(), 'tests'))
|
||||
for testfile in glob.glob('tests/test_*.py'):
|
||||
|
||||
query = sys.argv[1:] or glob.glob('tests/test_*.py')
|
||||
|
||||
for testfile in query:
|
||||
# Strip the tests/ and .py extension: tests/test_whatever.py => test_whatever
|
||||
module = testfile.replace('.py', '').replace('tests/', '')
|
||||
module = __import__(module)
|
||||
|
Loading…
Reference in New Issue
Block a user