diff --git a/.drone.yml b/.drone.yml index b69011027a..5c759f042e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -56,8 +56,8 @@ steps: - pip install -r ./requirements/examples.txt --user -q --upgrade-strategy only-if-needed - pip list - 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')" - - coverage run --source pytorch_lightning -m py.test pytorch_lightning tests -v --durations=25 # --flake8 - - python -m py.test benchmarks pl_examples -v --maxfail=2 --durations=0 # --flake8 + - coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --color=yes --durations=25 # --flake8 + - python -m py.test benchmarks pl_examples -v --color=yes --maxfail=2 --durations=0 # --flake8 #- cd docs; make doctest; make coverage - coverage report # see: https://docs.codecov.io/docs/merging-reports diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ca521d9b57..bed729e02b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -196,7 +196,7 @@ This is useful if you do not test against all required dependency versions. **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: ```bash -python -m pytest pytorch_lightning tests pl_examples -v --flake8 +python -m pytest pytorch_lightning tests pl_examples -v --color=yes --flake8 ``` ### Pull Request diff --git a/.github/workflows/ci_test-base.yml b/.github/workflows/ci_test-base.yml index 041bbb6268..9b490dec76 100644 --- a/.github/workflows/ci_test-base.yml +++ b/.github/workflows/ci_test-base.yml @@ -69,7 +69,7 @@ jobs: - name: Test Package [only] run: | # NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003 - coverage run --source pytorch_lightning -m pytest pytorch_lightning -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml + coverage run --source pytorch_lightning -m pytest pytorch_lightning -v --color=yes --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml - name: Upload pytest test results uses: actions/upload-artifact@master diff --git a/.github/workflows/ci_test-conda.yml b/.github/workflows/ci_test-conda.yml index a718269058..3289f5cbec 100644 --- a/.github/workflows/ci_test-conda.yml +++ b/.github/workflows/ci_test-conda.yml @@ -41,7 +41,7 @@ jobs: - name: Tests run: | # NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003 - python -m pytest pytorch_lightning tests -v --durations=0 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml + python -m pytest pytorch_lightning tests -v --color=yes --durations=0 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml # coverage report shell: bash -l {0} diff --git a/.github/workflows/ci_test-full.yml b/.github/workflows/ci_test-full.yml index e7c7ad486b..d74a923693 100644 --- a/.github/workflows/ci_test-full.yml +++ b/.github/workflows/ci_test-full.yml @@ -119,7 +119,7 @@ jobs: - name: Tests run: | # NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003 - 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 + 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 - name: Upload pytest test results uses: actions/upload-artifact@master diff --git a/dockers/tpu-tests/tpu_test_cases.jsonnet b/dockers/tpu-tests/tpu_test_cases.jsonnet index 9294727f42..99bcb024d9 100644 --- a/dockers/tpu-tests/tpu_test_cases.jsonnet +++ b/dockers/tpu-tests/tpu_test_cases.jsonnet @@ -21,7 +21,7 @@ local tputests = base.BaseTest { command: utils.scriptCommand( ||| cd pytorch-lightning - coverage run --source=pytorch_lightning -m pytest tests/models/test_tpu.py -v + coverage run --source=pytorch_lightning -m pytest tests/models/test_tpu.py -v --color=yes test_exit_code=$? echo "\n||| END PYTEST LOGS |||\n" coverage xml