From 002db960c6679500f23a4e0f4a73bbf310f3a6d7 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2019 12:13:32 +0000 Subject: [PATCH 1/2] build(deps-dev): bump pytest from 4.3.1 to 5.0.1 in /bot Bumps [pytest](https://github.com/pytest-dev/pytest) from 4.3.1 to 5.0.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/4.3.1...5.0.1) Signed-off-by: dependabot-preview[bot] --- bot/requirements-dev.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/requirements-dev.txt b/bot/requirements-dev.txt index 2005a9dcc..caaf01f0e 100644 --- a/bot/requirements-dev.txt +++ b/bot/requirements-dev.txt @@ -1,6 +1,6 @@ flake8==3.7.8 flake8-isort==2.7.0 -pytest==4.3.1 jsonschema==3.0.1 json-e==3.0.0 -responses==0.10.6 \ No newline at end of file +pytest==5.0.1 +responses==0.10.6 From ec0d6171005c11f41b06d1831688ee7aaa9a5434 Mon Sep 17 00:00:00 2001 From: Bastien Abadie Date: Wed, 24 Jul 2019 09:55:55 +0200 Subject: [PATCH 2/2] bot: Update pytest.raises syntax --- bot/tests/test_artifacts.py | 2 +- bot/tests/test_grcov.py | 4 ++-- bot/tests/test_taskcluster.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bot/tests/test_artifacts.py b/bot/tests/test_artifacts.py index 57691bae8..85cdc02cd 100644 --- a/bot/tests/test_artifacts.py +++ b/bot/tests/test_artifacts.py @@ -72,7 +72,7 @@ def add_dir(files): 'linux_xpcshell-7_code-coverage-grcov.zip' ]) - with pytest.raises(Exception, message='suite and chunk can\'t both have a value'): + with pytest.raises(Exception, match='suite and chunk can\'t both have a value'): a.get(chunk='xpcshell-7', suite='mochitest') diff --git a/bot/tests/test_grcov.py b/bot/tests/test_grcov.py index e9c1341ed..a82377b0d 100644 --- a/bot/tests/test_grcov.py +++ b/bot/tests/test_grcov.py @@ -14,9 +14,9 @@ def covdir_get(report, path): def test_report_invalid_output_format(grcov_artifact): - with pytest.raises(AssertionError, message='Unsupported output format'): + with pytest.raises(AssertionError, match='Unsupported output format'): grcov.report([grcov_artifact], out_format='UNSUPPORTED') - with pytest.raises(AssertionError, message='Unsupported output format'): + with pytest.raises(AssertionError, match='Unsupported output format'): grcov.report([grcov_artifact], out_format='coveralls') diff --git a/bot/tests/test_taskcluster.py b/bot/tests/test_taskcluster.py index a7228fb67..ec7cb5e19 100644 --- a/bot/tests/test_taskcluster.py +++ b/bot/tests/test_taskcluster.py @@ -45,7 +45,7 @@ def test_get_task_failure(TASK_NOT_FOUND): err['code'] = 'RandomError' responses.add(responses.GET, 'https://index.taskcluster.net/v1/task/gecko.v2.mozilla-central.revision.b2a9a4bb5c94de179ae7a3f52fde58c0e2897498.firefox.linux64-ccov-debug', json=err, status=500) # noqa - with pytest.raises(taskcluster.TaskclusterException, message='Unknown TaskCluster index error.'): + with pytest.raises(taskcluster.TaskclusterException, match='Unknown TaskCluster index error.'): taskcluster.get_task('mozilla-central', 'b2a9a4bb5c94de179ae7a3f52fde58c0e2897498', 'linux') @@ -179,7 +179,7 @@ def test_get_platform(): def test_download_artifact_forbidden(mocked_sleep, tmpdir): responses.add(responses.GET, 'https://queue.taskcluster.net/v1/task/FBdocjnAQOW_GJDOfmgjxw/artifacts/public/test_info/code-coverage-grcov.zip', body='xml error...', status=403) # noqa - with pytest.raises(requests.exceptions.HTTPError, message='403 Client Error: Forbidden for url: https://taskcluster-artifacts.net/FBdocjnAQOW_GJDOfmgjxw/0/public/test_info/code-coverage-grcov.zip'): # noqa + with pytest.raises(requests.exceptions.HTTPError, match='403 Client Error: Forbidden for url: https://queue.taskcluster.net/v1/task/FBdocjnAQOW_GJDOfmgjxw/artifacts/public/test_info/code-coverage-grcov.zip'): # noqa taskcluster.download_artifact( os.path.join(tmpdir.strpath, 'windows_reftest-6_code-coverage-grcov.zip'), 'FBdocjnAQOW_GJDOfmgjxw', @@ -194,7 +194,7 @@ def test_download_artifact_forbidden(mocked_sleep, tmpdir): def test_download_artifact_badzip(mocked_sleep, tmpdir): responses.add(responses.GET, 'https://queue.taskcluster.net/v1/task/FBdocjnAQOW_GJDOfmgjxw/artifacts/public/test_info/code-coverage-grcov.zip', body='NOT A ZIP FILE', status=200, stream=True) # noqa - with pytest.raises(BadZipFile, message='File is not a zip file'): + with pytest.raises(BadZipFile, match='File is not a zip file'): taskcluster.download_artifact( os.path.join(tmpdir.strpath, 'windows_reftest-6_code-coverage-grcov.zip'), 'FBdocjnAQOW_GJDOfmgjxw',