From 6ec7fcb136fb054050ff0de73c04a40c8ad71202 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Sat, 7 Jan 2023 12:26:30 -0500 Subject: [PATCH] chore(tests): add large model test marker to pytest.ini --- DEVELOPER.md | 18 +++++++++++++----- autotest/pytest.ini | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/DEVELOPER.md b/DEVELOPER.md index d68e8f72a36..aa5b986c9ea 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -354,6 +354,8 @@ pytest -v -n auto Markers can be used to select subsets of tests. Markers provided in `pytest.ini` include: - `slow`: tests that take longer than a few seconds to complete +- `repo`: tests that require external model repositories +- `large`: tests using large models (from the `modflow6-examples` and `modflow6-largetestmodels` repos) - `regression`: tests comparing results from multiple versions Markers can be used with the `-m ` option, and can be applied in boolean combinations with `and`, `or` and `not`. For instance, to run fast tests in parallel, excluding regression tests: @@ -378,18 +380,24 @@ Tests using models from external repositories can be selected with the `repo` ma pytest -v -n auto -m "repo" ``` -The test scripts can also be run independently: +The `large` marker is a subset of the `repo` marker. To test models excluded from commit-triggered CI and only run on GitHub Actions nightly: ```shell -# Run MODFLOW 6 test models +pytest -v -n auto -m "large" +``` + +Test scripts for external model repositories can also be run independently: + +```shell +# MODFLOW 6 test models pytest -v -n auto test_z01_testmodels_mf6.py -# Run MODFLOW 5 to 6 conversion test models +# MODFLOW 5 to 6 conversion test models pytest -v -n auto test_z02_testmodels_mf5to6.py -# Run example models +# models from modflow6-examples repo pytest -v -n auto test_z03_examples.py -# Run large test models +# models from modflow6-largetestmodels repo pytest -v -n auto test_z03_largetestmodels.py ``` diff --git a/autotest/pytest.ini b/autotest/pytest.ini index 1bfeebe755b..a58a609e769 100644 --- a/autotest/pytest.ini +++ b/autotest/pytest.ini @@ -5,6 +5,7 @@ python_files = markers = slow: tests taking more than a few seconds to complete repo: tests using models loaded from an external repository + large: tests using large models (examples and largetestmodels) regression: comparing results from different versions developmode: tests that should only run with IDEVELOPMODE = 1 gwf: tests for groundwater flow models