| """Run the published test suite against the local JIT build. |
| |
| python dev/run_local.py [pytest args] |
| """ |
| import os |
| import sys |
| import types |
|
|
| ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| sys.path.insert(0, ROOT) |
|
|
| import load_local |
|
|
| mod = load_local.load(verbose="-v" in sys.argv) |
|
|
| fake = types.ModuleType("kernels") |
| fake.get_kernel = lambda repo, **kw: mod |
| fake.__version__ = "local" |
| sys.modules["kernels"] = fake |
|
|
| import pytest |
|
|
| args = [os.path.join(ROOT, "tests")] + [a for a in sys.argv[1:]] |
| if not any(a.startswith("-") for a in args[1:]): |
| args += ["-q", "--no-header"] |
| sys.exit(pytest.main(args)) |
|
|