You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contributing/tests.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,17 @@ We greatly appreciate Pull Requests that extend the automated tests that vet the
4
4
5
5
## How the Tests Work
6
6
7
-
A [GitHub Action workflow](https://github.com/jupyter/docker-stacks/blob/main/.github/workflows/docker.yml)
7
+
A [GitHub Action workflow](https://github.com/jupyter/docker-stacks/blob/main/.github/workflows/docker-build-test-upload.yml)
8
8
runs tests against pull requests submitted to the `jupyter/docker-stacks` repository.
9
9
10
10
We use the `pytest` module to run tests on the image.
11
11
`conftest.py` and `pytest.ini` in the `tests` folder define the environment in which tests are run.
12
12
More info on `pytest` can be found [here](https://docs.pytest.org/en/latest/contents.html).
13
13
14
-
The actual image-specific test files are located in folders like `tests/<somestack>/` (e.g., `tests/docker-stacks-foundation/`, `tests/minimal-notebook/`, etc.).
14
+
The actual image-specific test files are located in folders like `tests/by_image/<somestack>/` (e.g., `tests/by_image/docker-stacks-foundation/`, etc.).
15
15
16
16
```{note}
17
-
If your test is located in `tests/<somestack>/`, it will be run against the `jupyter/<somestack>` image and against all the [images inherited from this image](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#image-relationships.
17
+
If your test is located in `tests/by_image/<somestack>/`, it will be run against the `jupyter/<somestack>` image and against all the [images inherited from this image](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#image-relationships).
18
18
```
19
19
20
20
Many tests make use of global [pytest fixtures](https://docs.pytest.org/en/latest/reference/fixtures.html)
@@ -23,15 +23,15 @@ defined in the [conftest.py](https://github.com/jupyter/docker-stacks/blob/main/
23
23
## Unit tests
24
24
25
25
You can add a unit test if you want to run a Python script in one of our images.
26
-
You should create a `tests/<somestack>/units/` directory, if it doesn't already exist, and put your file there.
26
+
You should create a `tests/by_image/<somestack>/units/` directory, if it doesn't already exist, and put your file there.
27
27
Files in this folder will be executed in the container when tests are run.
28
-
You can see an [TensorFlow package example here](https://github.com/jupyter/docker-stacks/blob/HEAD/tests/tensorflow-notebook/units/unit_tensorflow.py).
28
+
You can see an [TensorFlow package example here](https://github.com/jupyter/docker-stacks/blob/HEAD/tests/by_image/tensorflow-notebook/units/unit_tensorflow.py).
29
29
30
30
## Contributing New Tests
31
31
32
32
Please follow the process below to add new tests:
33
33
34
-
1. Add your test code to one of the modules in the `tests/<somestack>/` directory or create a new module.
34
+
1. Add your test code to one of the modules in the `tests/by_image/<somestack>/` directory or create a new module.
35
35
2. Build one or more images you intend to test and run the tests locally.
0 commit comments