Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand headless env testing in "Test organization" #303

Merged
merged 3 commits into from
Jan 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions docs/developers/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,22 @@ from unit tests to integration and functional tests.

All of `napari` tests are located in folders named `_tests`. We keep our unit
tests located in the individual folders with the modules or functions they are
testing (e.g. the tests for the `Image` layer are located in a `_tests` folder
alongside the `image.py` file). Our integration and functional tests are located in
testing (e.g. the tests for the `Image` layer are located in
`/napari/layers/image/_tests` alongside the `Image` layer code). Our integration and
functional tests are located in
the `napari/_tests` folder at the top of the repository.

We also strive to unit test as much of our model file and utils code independently of
our GUI code. These tests are located in the `napari/layers`, `napari/components`,
and `napari/utils` folders. Our GUI code is tests in the `napari/_tests`,
`napari/_qt`, `napari/_vispy` folders. The `napari/plugins` folder contains a mix
of tests.
`napari/_qt`, `napari/_vispy` folders. The tests in these three folders are ignored
when we run them in the subset of our
[continuous integration](https://en.wikipedia.org/wiki/Continuous_integration)
workflows that run in a headless environment (without a Qt backend).
When we are testing "non-GUI" code in a way that requires a GUI backend, they are
placed here. The `napari/plugins` folder contains a mix of tests.

Pytest fixtures that are available globally to aid testing live in `napari/conftest.py`.

## Running tests

Expand Down