Skip to content

Commit 829d90b

Browse files
tchatonJeff Yang
andauthored
activated color in all pytest runs (#4254)
* activated color in all pytest runs * Update .drone.yml Co-authored-by: Jeff Yang <[email protected]> Co-authored-by: Jeff Yang <[email protected]>
1 parent 3777988 commit 829d90b

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

.drone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ steps:
5656
- pip install -r ./requirements/examples.txt --user -q --upgrade-strategy only-if-needed
5757
- pip list
5858
- python -c "import torch ; print(' & '.join([torch.cuda.get_device_name(i) for i in range(torch.cuda.device_count())]) if torch.cuda.is_available() else 'only CPU')"
59-
- coverage run --source pytorch_lightning -m py.test pytorch_lightning tests -v --durations=25 # --flake8
60-
- python -m py.test benchmarks pl_examples -v --maxfail=2 --durations=0 # --flake8
59+
- coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --color=yes --durations=25 # --flake8
60+
- python -m py.test benchmarks pl_examples -v --color=yes --maxfail=2 --durations=0 # --flake8
6161
#- cd docs; make doctest; make coverage
6262
- coverage report
6363
# see: https://docs.codecov.io/docs/merging-reports

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ This is useful if you do not test against all required dependency versions.
196196
**Docker:** Another option is utilize the [pytorch lightning cuda base docker image](https://hub.docker.com/repository/docker/pytorchlightning/pytorch_lightning/tags?page=1&name=cuda). You can then run:
197197

198198
```bash
199-
python -m pytest pytorch_lightning tests pl_examples -v --flake8
199+
python -m pytest pytorch_lightning tests pl_examples -v --color=yes --flake8
200200
```
201201

202202
### Pull Request

.github/workflows/ci_test-base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
- name: Test Package [only]
7070
run: |
7171
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003
72-
coverage run --source pytorch_lightning -m pytest pytorch_lightning -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
72+
coverage run --source pytorch_lightning -m pytest pytorch_lightning -v --color=yes --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
7373
7474
- name: Upload pytest test results
7575
uses: actions/upload-artifact@master

.github/workflows/ci_test-conda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Tests
4242
run: |
4343
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003
44-
python -m pytest pytorch_lightning tests -v --durations=0 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
44+
python -m pytest pytorch_lightning tests -v --color=yes --durations=0 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
4545
# coverage report
4646
shell: bash -l {0}
4747

.github/workflows/ci_test-full.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
- name: Tests
120120
run: |
121121
# NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003
122-
coverage run --source pytorch_lightning -m pytest pytorch_lightning tests pl_examples -v --durations=0 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
122+
coverage run --source pytorch_lightning -m pytest pytorch_lightning tests pl_examples -v --color=yes --durations=0 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
123123
124124
- name: Upload pytest test results
125125
uses: actions/upload-artifact@master

dockers/tpu-tests/tpu_test_cases.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ local tputests = base.BaseTest {
2121
command: utils.scriptCommand(
2222
|||
2323
cd pytorch-lightning
24-
coverage run --source=pytorch_lightning -m pytest tests/models/test_tpu.py -v
24+
coverage run --source=pytorch_lightning -m pytest tests/models/test_tpu.py -v --color=yes
2525
test_exit_code=$?
2626
echo "\n||| END PYTEST LOGS |||\n"
2727
coverage xml

0 commit comments

Comments
 (0)