in setup.py [0:0]
def run_tests(self) -> None:
# import here, cause outside the eggs aren't loaded
import sys
import pytest
# run the tests, then the format checks.
os.environ["HPC_RUNTIME_CHECKS"] = "true"
errno = pytest.main(self.test_args + ["-k", "not hypothesis"])
if errno != 0:
sys.exit(errno)
if not PyTest.skip_hypothesis:
os.environ["HPC_RUNTIME_CHECKS"] = "false"
errno = pytest.main(self.test_args + ["-k", "hypothesis"])
if errno != 0:
sys.exit(errno)
check_call(
["black", "--check", "src", "test", "util"],
cwd=os.path.dirname(os.path.abspath(__file__)),
)
check_call(
["isort", "-c"],
cwd=os.path.join(os.path.dirname(os.path.abspath(__file__)), "src"),
)
check_call(
["isort", "-c"],
cwd=os.path.join(os.path.dirname(os.path.abspath(__file__)), "test"),
)
check_call(
["isort", "-c"],
cwd=os.path.join(os.path.dirname(os.path.abspath(__file__)), "util"),
)
run_type_checking()
sys.exit(errno)