diff --git a/pylib/tests/run_pytest.py b/pylib/tests/run_pytest.py index f1a8dcfc5..5884588bf 100644 --- a/pylib/tests/run_pytest.py +++ b/pylib/tests/run_pytest.py @@ -7,4 +7,9 @@ os.environ["SHIFT_CLOCK_HACK"] = "1" if __name__ == "__main__": folder = os.path.join(os.path.dirname(__file__), "..", "tests") - sys.exit(pytest.main(["--verbose", "-s", folder])) + args = ["--verbose", "-s", folder] + # allow specifying an individual test, eg + # bazel test //pylib:pytest --test_env=PYTEST=test_bury + if pytest_extra := os.environ.get("PYTEST", ""): + args.extend(["-k", pytest_extra]) + sys.exit(pytest.main(args))