Running Tests
Tests for the Epilepsy12-specific parts of the platform are organised in an epilepsy12/tests/
folder inside the epilepsy12 app. We have opted to use Pytest, which is well-regarded in the Django community.
Active Docker Container
Please ensure that your Docker container is still built and active. The previous command in the 'Docker setup' page was to illustrate how to close the Docker container. To reopen it, run:
s/up
Running pytest
¶
When running tests, it is important to understand that they will only run inside the Docker container (assuming you have used the Docker development setup). Therefore, how you run the tests depends on whether you are using Docker Desktop (either through the native application or VSCode extension where you can attach a shell terminal to the Docker environment) or Docker Compose. The following examples assume you are at the root of the project.
Using the integrated terminal in Docker Desktop:
pytest
Run the following command in your normal system terminal:
s/test