From 41e668ef3c902338a349aff04e495c16532c0c87 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Sat, 30 Sep 2023 10:38:30 -0400 Subject: [PATCH] test(generate_classes): skip on master and release branches (#1971) --- autotest/test_generate_classes.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/autotest/test_generate_classes.py b/autotest/test_generate_classes.py index 06527a56fe..a169ec3922 100644 --- a/autotest/test_generate_classes.py +++ b/autotest/test_generate_classes.py @@ -3,10 +3,29 @@ from pprint import pprint import pytest +from modflow_devtools.misc import get_current_branch + +branch = get_current_branch() @pytest.mark.mf6 -def test_generate_classes_from_dfn(virtualenv, project_root_path): +@pytest.mark.slow +@pytest.mark.regression +@pytest.mark.skipif( + branch == "master" or branch.startswith("v"), + reason="skip on master and release branches", +) +def test_generate_classes_from_github_refs( + request, virtualenv, project_root_path, ref, worker_id +): + argv = ( + request.config.workerinput["mainargv"] + if hasattr(request.config, "workerinput") + else [] + ) + if worker_id != "master" and "loadfile" not in argv: + pytest.skip("can't run in parallel") + python = virtualenv.python venv = Path(python).parent print(f"Using temp venv at {venv} with python {python}")