Skip to content

Commit

Permalink
Remove @pytest.mark.fuzz
Browse files Browse the repository at this point in the history
This was an unregistered pytest mark, and pytest now emits a warning,
which causes our tests to fail, when an unregistered mark is used:

pytest-dev/pytest#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
  • Loading branch information
seanh committed May 13, 2019
1 parent 1ef2545 commit 80d280d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion tests/h/auth/tokens_test.py
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests/h/search/parser_test.py
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 80d280d

Please sign in to comment.