Skip to content

Commit

Permalink
docs: add info about pytest markers
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewphilipsmith committed Nov 27, 2024
1 parent 30a8b2a commit 4914908
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ isort (python)...........................................................Passed
# Running tests
Only some portions of the python `clim-recal` code has unit tests. Additionally there are integration tests which require direct access to [the data](/README#the-datasets) mounted on the hardcoded path `/mnt/vmfileshare/ClimateData` (which matches our configuration on `linux`). There are ways of running those integration tests locally if you are able to mount the `ClimateData` drive to that path, either via `conda` or `docker` (`conda` if running `linux`, in theory any operating system if running `docker`).
The python `clim-recal` codebase includes a mixture of unit and integration tests.
The instructions below cover running the tests that do not require additional data:
The integration tests are identified using the pytest markers specified in the `markers` section of `pyproject.toml`. These marker description indicate the environment required to run each set of integration test. For example where a particular operating system is required, or for case which require direct access to [the data](/README#the-datasets) mounted on the hardcoded path `/mnt/vmfileshare/ClimateData`.
The instructions below cover running the tests on a development machine which do not require access to the external data:
## Running tests in `conda`
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ testpaths = [
markers = [
"slow: slow tests (deselect with '-m \"not slow\".')",
"server: designed to only run on a server.",
"mount: requires specifc data mounted.",
"mount: requires specific data mounted.",
"docker: requires running via docker jupyterlab.",
"multiprocess: uses multiprocessing.",
"darwin: requires darwin (macOS) operating system.",
Expand Down

0 comments on commit 4914908

Please sign in to comment.