-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_test.py
executable file
·46 lines (36 loc) · 1.15 KB
/
run_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import logging
import tempfile
import platform
import pytest
import pathlib
import pkg_resources
def main():
os.environ["pygenome_data_dir"] = tempfile.mkdtemp(prefix="pygenome_data_dir_")
os.environ["pygenome_log_dir"] = tempfile.mkdtemp(prefix="pygenome_log_dir_")
os.environ["pygenome_config_dir"] = tempfile.mkdtemp(prefix="pygenome_config_dir_")
os.environ["pygenome_loglevel"] = str( logging.DEBUG )
from pygenome import __file__ as pygenomeinit
doctestdir = str(pathlib.Path(pygenomeinit).parent)
args = [ "tests",
doctestdir,
"--capture=no",
"--durations=10",
"--cov=pygenome",
"--cov-report=html",
"--cov-report=xml",
"--import-mode=importlib",
"--nbval",
"--current-env",
"--doctest-modules",
"--capture=no",
"--import-mode=importlib",
"-vvv"]
result_suite = pytest.cmdline.main(args)
return int(result_suite)
if __name__ == "__main__":
result = main()
sys.exit(result)