From 2fcf21a6c7c3b77f7284fdc9bd11b06bed257c59 Mon Sep 17 00:00:00 2001 From: James Cooke Date: Fri, 20 Sep 2019 18:36:25 +0100 Subject: [PATCH 1/4] Fix logging doc: change x.level to x.levelno --- doc/en/logging.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/logging.rst b/doc/en/logging.rst index c32205f13ad..e6f91cdf781 100644 --- a/doc/en/logging.rst +++ b/doc/en/logging.rst @@ -161,7 +161,7 @@ the records for the ``setup`` and ``call`` stages during teardown like so: yield window for when in ("setup", "call"): messages = [ - x.message for x in caplog.get_records(when) if x.level == logging.WARNING + x.message for x in caplog.get_records(when) if x.levelno == logging.WARNING ] if messages: pytest.fail( From de8fdab7a97b958ed5e85729114e8bb6689e05fe Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 21 Sep 2019 14:40:24 -0300 Subject: [PATCH 2/4] Change report-coverage.sh in attempt to fix Azure Recently sometimes Azure has failed with: ++ curl -s https://codecov.io/bash bash: /dev/fd/63: No such file or directory This attempts to fix this by modifying report-coverage.sh slightly. --- scripts/report-coverage.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/report-coverage.sh b/scripts/report-coverage.sh index 755783d2adf..362dab0918a 100755 --- a/scripts/report-coverage.sh +++ b/scripts/report-coverage.sh @@ -13,4 +13,5 @@ fi python -m coverage combine python -m coverage xml python -m coverage report -m -bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml +curl -S -L --retry 3 -s https://codecov.io/bash -o codecov-upload.sh +bash codecov-upload.sh -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml From ea0c7e43b6f31500ad20c9c9c986544b1bd060a1 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 23 Sep 2019 02:26:53 +0200 Subject: [PATCH 3/4] Remove unneeded codecov options (implied with "-f") --- scripts/report-coverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/report-coverage.sh b/scripts/report-coverage.sh index 362dab0918a..500d217f053 100755 --- a/scripts/report-coverage.sh +++ b/scripts/report-coverage.sh @@ -14,4 +14,4 @@ python -m coverage combine python -m coverage xml python -m coverage report -m curl -S -L --retry 3 -s https://codecov.io/bash -o codecov-upload.sh -bash codecov-upload.sh -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml +bash codecov-upload.sh -Z -X fix -f coverage.xml From 04c01fb606cdd3a51c04d945fc92c673905d6ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 23 Sep 2019 16:23:14 +0200 Subject: [PATCH 4/4] test_argcomplete do not call python directly #5872 Use sys.executable to detect which python we should actually be testing. --- testing/test_parseopt.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/test_parseopt.py b/testing/test_parseopt.py index dd7bc875387..5350974d786 100644 --- a/testing/test_parseopt.py +++ b/testing/test_parseopt.py @@ -298,7 +298,11 @@ def test_argcomplete(testdir, monkeypatch): # redirect output from argcomplete to stdin and stderr is not trivial # http://stackoverflow.com/q/12589419/1307905 # so we use bash - fp.write('COMP_WORDBREAKS="$COMP_WORDBREAKS" python -m pytest 8>&1 9>&2') + fp.write( + 'COMP_WORDBREAKS="$COMP_WORDBREAKS" {} -m pytest 8>&1 9>&2'.format( + sys.executable + ) + ) # alternative would be exteneded Testdir.{run(),_run(),popen()} to be able # to handle a keyword argument env that replaces os.environ in popen or # extends the copy, advantage: could not forget to restore