Skip to content

Commit 57e8471

Browse files
ericsnowcurrentlyd3r3kk
authored andcommitted
Set up tests for the extension's Python files. (#4208)
Switch to using pytest. * __main__.py -> run_all.py (to avoid need for setting PYTHONPATH).
1 parent e708760 commit 57e8471

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

pythonFiles/tests/__init__.py

Whitespace-only changes.

pythonFiles/tests/datascience/__init__.py

Whitespace-only changes.

pythonFiles/tests/run_all.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import os.path
2+
import sys
3+
4+
import pytest
5+
6+
7+
TEST_ROOT = os.path.dirname(__file__)
8+
SRC_ROOT = os.path.dirname(TEST_ROOT)
9+
DATASCIENCE_ROOT = os.path.join(SRC_ROOT, 'datascience')
10+
11+
12+
if __name__ == '__main__':
13+
sys.path.insert(1, DATASCIENCE_ROOT)
14+
ec = pytest.main([
15+
'--rootdir', SRC_ROOT,
16+
TEST_ROOT,
17+
])
18+
sys.exit(ec)

0 commit comments

Comments
 (0)