Skip to content

Commit 4f63942

Browse files
Makefile: Refer to CONTRIBUTING doc, reword test to avoid "example" (#5910)
CONTRIBUTING: Add concrete example for running single test
1 parent b5d29df commit 4f63942

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/CONTRIBUTING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Most of the tests in PyTorch Lightning train a trial MNIST model under various t
108108
To build the documentation locally, simply execute the following commands from project root (only for Unix):
109109
- `make clean` cleans repo from temp/generated files
110110
- `make docs` builds documentation under _docs/build/html_
111-
- `make test` runs all project's tests
111+
- `make test` runs all project's tests with coverage
112112

113113
### Original code
114114

@@ -205,6 +205,12 @@ This is useful if you do not test against all required dependency versions.
205205
python -m pytest pytorch_lightning tests pl_examples -v
206206
```
207207

208+
You can also run a single test as follows:
209+
210+
```bash
211+
python -m pytest -v tests/trainer/test_trainer_cli.py::test_default_args
212+
```
213+
208214
### Pull Request
209215

210216
We welcome any useful contribution! For your convenience here's a recommended workflow:

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ clean:
1919
rm -rf ./docs/source/api
2020

2121
test: clean
22+
# Review the CONTRIBUTING docmentation for other ways to test.
2223
pip install -r requirements/devel.txt
2324
# install APEX, see https://github.com/NVIDIA/apex#linux
2425

25-
# use this to run tests
26+
# run tests with coverage
2627
python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests pl_examples -v
2728
python -m coverage report
2829

0 commit comments

Comments
 (0)