Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bot/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -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
pytest==5.0.1
responses==0.10.6
2 changes: 1 addition & 1 deletion bot/tests/test_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')


Expand Down
4 changes: 2 additions & 2 deletions bot/tests/test_grcov.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')


Expand Down
6 changes: 3 additions & 3 deletions bot/tests/test_taskcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')


Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down