Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Commit 2c8d8f2

Browse files
authored
TST: add script to run tests (#49)
* TST: add script to run tests Since stubs-only packages have to be installed, add a simple script that installs the stubs and then invokes pytest. * MAINT: rename runtests -> runtests.py * MAINT: invoke pip under `sys.executable`
1 parent ba67281 commit 2c8d8f2

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

runtests.py

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env python
2+
import os
3+
import subprocess
4+
import sys
5+
6+
import pytest
7+
8+
STUBS_ROOT = os.path.dirname(os.path.abspath(__file__))
9+
10+
11+
def main():
12+
subprocess.run(
13+
[sys.executable, '-m', 'pip', 'install', STUBS_ROOT],
14+
capture_output=True,
15+
check=True,
16+
)
17+
sys.exit(pytest.main([STUBS_ROOT] + sys.argv[1:]))
18+
19+
20+
if __name__ == '__main__':
21+
main()

0 commit comments

Comments
 (0)