Skip to content

Commit

Permalink
chore(tests): add large model test marker to pytest.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Jan 17, 2023
1 parent 0b4e70d commit 08ea367
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 107 deletions.
18 changes: 13 additions & 5 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,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 <marker>` option, and can be applied in boolean combinations with `and`, `or` and `not`. For instance, to run fast tests in parallel, excluding regression tests:
Expand All @@ -386,18 +388,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
```
8 changes: 4 additions & 4 deletions autotest/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ markers =
developmode: tests that should only run with IDEVELOPMODE = 1
gwf: tests for groundwater flow models
gwt: tests for groundwater transport models
ats: tests for adaptive time step utility plugin
aux: tests for auxiliary variables plugin
lak: tests for flow lake plugin
maw: tests for multi-aquifer well plugin
ats: tests for adaptive time step package
aux: tests for auxiliary variables
lak: tests for lake package
maw: tests for multi-aquifer well package
98 changes: 0 additions & 98 deletions autotest/targets.py

This file was deleted.

0 comments on commit 08ea367

Please sign in to comment.