diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 4eed846b28e05..c5719c682dbde 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -108,7 +108,7 @@ Most of the tests in PyTorch Lightning train a trial MNIST model under various t To build the documentation locally, simply execute the following commands from project root (only for Unix): - `make clean` cleans repo from temp/generated files - `make docs` builds documentation under _docs/build/html_ -- `make test` runs all project's tests +- `make test` runs all project's tests with coverage ### Original code @@ -205,6 +205,12 @@ This is useful if you do not test against all required dependency versions. python -m pytest pytorch_lightning tests pl_examples -v ``` +You can also run a single test as follows: + +```bash +python -m pytest -v tests/trainer/test_trainer_cli.py::test_default_args +``` + ### Pull Request We welcome any useful contribution! For your convenience here's a recommended workflow: diff --git a/Makefile b/Makefile index 964b9ab10361b..d35e0b77f8429 100644 --- a/Makefile +++ b/Makefile @@ -19,10 +19,11 @@ clean: rm -rf ./docs/source/api test: clean + # Review the CONTRIBUTING docmentation for other ways to test. pip install -r requirements/devel.txt # install APEX, see https://github.com/NVIDIA/apex#linux - # use this to run tests + # run tests with coverage python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests pl_examples -v python -m coverage report