From 88c8049a3c23365bd309e033853a9e8cac8eb932 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 4 Mar 2019 18:08:41 +0100 Subject: [PATCH 1/4] Travis: run `pytest --help` for (stable) TTY coverage According to https://codecov.io/gh/pytest-dev/pytest/pull/4881/changes the "isatty" branches in _pytest/terminal.py are flaky. This tries to fix it. --- .travis.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 58c7e67519d..73480acb130 100644 --- a/.travis.yml +++ b/.travis.yml @@ -98,14 +98,20 @@ before_script: export _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess fi -script: tox --recreate +script: + - tox --recreate + # Add last TOXENV to $PATH. + - PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH" + - | + if [[ "$PYTEST_COVERAGE" = 1 ]]; then + which coverage + coverage run -m pytest --help + fi after_success: - | if [[ "$PYTEST_COVERAGE" = 1 ]]; then set -e - # Add last TOXENV to $PATH. - PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH" coverage combine coverage xml coverage report -m From 45ab30e349fbe63ced2e02f62b30a26185b9e81c Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 4 Mar 2019 18:12:09 +0100 Subject: [PATCH 2/4] debug --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 73480acb130..f164e1981b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -99,6 +99,7 @@ before_script: fi script: + - python -c 'import sys; assert sys.stdout.isatty()' - tox --recreate # Add last TOXENV to $PATH. - PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH" From 8278322698ae855c104556bcd5a856e4b26ca853 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 4 Mar 2019 18:22:27 +0100 Subject: [PATCH 3/4] revisit --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index f164e1981b3..c06dc554aab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -99,13 +99,14 @@ before_script: fi script: - - python -c 'import sys; assert sys.stdout.isatty()' - tox --recreate - # Add last TOXENV to $PATH. - - PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH" + - | + # Cover terminalreport for isatty. + # Add last TOXENV to $PATH (also used below). + PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH" + python -c 'import sys; assert sys.stdout.isatty()' if [[ "$PYTEST_COVERAGE" = 1 ]]; then - which coverage coverage run -m pytest --help fi From 042f61ef5896542485aed53e12312bc4a6ee6714 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 4 Mar 2019 19:35:20 +0100 Subject: [PATCH 4/4] TEMP: try without --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c06dc554aab..54625f9d20a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -106,9 +106,9 @@ script: # Add last TOXENV to $PATH (also used below). PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH" python -c 'import sys; assert sys.stdout.isatty()' - if [[ "$PYTEST_COVERAGE" = 1 ]]; then - coverage run -m pytest --help - fi + # if [[ "$PYTEST_COVERAGE" = 1 ]]; then + # coverage run -m pytest --help + # fi after_success: - |