From 66be5ceab463307c25d42c979825960aadca2198 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Fri, 6 Jan 2023 09:48:39 -0800 Subject: [PATCH] Fix link, add non-Docker commands (#4036) --- docs/testing.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/testing.rst b/docs/testing.rst index dd6fcb48..bea45c6d 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -28,10 +28,15 @@ Coverage You should build your tests to provide the highest level of **code coverage**. You can run the ``pytest`` with code ``coverage`` by typing in the following command: :: - $ docker-compose -f local.yml run --rm django coverage run -m pytest + $ coverage run -m pytest Once the tests are complete, in order to see the code coverage, run the following command: :: + $ coverage report + +If you're running the project locally with Docker, use these commands instead: :: + + $ docker-compose -f local.yml run --rm django coverage run -m pytest $ docker-compose -f local.yml run --rm django coverage report .. note:: @@ -53,4 +58,4 @@ Once the tests are complete, in order to see the code coverage, run the followin .. _develop locally with docker: ./developing-locally-docker.html .. _customize: https://docs.pytest.org/en/latest/customize.html .. _unittest: https://docs.python.org/3/library/unittest.html#module-unittest -.. _configuring: https://coverage.readthedocs.io/en/v4.5.x/config.html +.. _configuring: https://coverage.readthedocs.io/en/latest/config.html