From 80d280d451f991f10f57ca78fedac66252eb781c Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Mon, 13 May 2019 11:24:23 +0100 Subject: [PATCH] Remove @pytest.mark.fuzz This was an unregistered pytest mark, and pytest now emits a warning, which causes our tests to fail, when an unregistered mark is used: https://github.com/pytest-dev/pytest/pull/4935 Rather than registering the mark simply delete all uses of it. All tests that're defined using hypothesis automatically have the `@pytest.mark.hypothesis` mark applied to them so it's not necessary to try to remember to manually apply a custom mark to every test that uses hypothesis: https://hypothesis.readthedocs.io/en/latest/details.html#the-hypothesis-pytest-plugin --- tests/h/auth/tokens_test.py | 1 - tests/h/search/parser_test.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/tests/h/auth/tokens_test.py b/tests/h/auth/tokens_test.py index 1514fb612ba..eb637aa0133 100644 --- a/tests/h/auth/tokens_test.py +++ b/tests/h/auth/tokens_test.py @@ -77,7 +77,6 @@ def test_returns_none_for_malformed_header(self, pyramid_request): assert result is None @given(header=st.text()) - @pytest.mark.fuzz def test_returns_none_for_malformed_header_fuzz(self, header, pyramid_request): assume(not header.startswith("Bearer ")) pyramid_request.headers["Authorization"] = header diff --git a/tests/h/search/parser_test.py b/tests/h/search/parser_test.py index 79fa9f4328a..56c1744a226 100644 --- a/tests/h/search/parser_test.py +++ b/tests/h/search/parser_test.py @@ -128,7 +128,6 @@ def test_parse_with_odd_quotes_combinations(query_in, query_out): @given(st.text()) @settings(max_examples=30) -@pytest.mark.fuzz def test_parse_always_return_a_multidict(text): """Given any string input, output should always be a MultiDict.""" result = parser.parse(text) @@ -144,7 +143,6 @@ def test_parse_always_return_a_multidict(text): @given(kw=st.sampled_from(parser.named_fields), value=nonwhitespace_text) @settings(max_examples=30) -@pytest.mark.fuzz def test_parse_with_any_nonwhitespace_text(kw, value): result = parser.parse(kw + ":" + value) assert result.get(kw) == value