Skip to content

Commit

Permalink
test: Suppress html link function base_href test warnings
Browse files Browse the repository at this point in the history
Use of bool() in strategy filtering raised a few eyebrows but no harm
  • Loading branch information
abelcheung committed Dec 12, 2024
1 parent 683d933 commit ba89980
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/runtime/html/test_link_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,12 @@ def test_handle_failures_wrong_type(
# Not testing resolve_base_href type, as it is a truthy/falsy argument
# that can be anything

# Falsy values got short circuited by urljoin() and never raises
@settings(suppress_health_check=[HealthCheck.too_slow], max_examples=500)
@given(t=_st.all_instances_except_of_type(str, NoneType).filter(bool))
@pytest.mark.slow
@pytest.mark.filterwarnings("ignore:NotImplemented should not be used in a boolean context:DeprecationWarning") # noqa: E501
@pytest.mark.filterwarnings("ignore:The behavior of this method will change .+:FutureWarning") # noqa: E501
def test_base_href(
self, disposable_html_with_base_href: HtmlElement, t: Any
) -> None:
Expand Down Expand Up @@ -412,6 +415,8 @@ def test_link_repl_func_input_arg(
@settings(suppress_health_check=[HealthCheck.too_slow], max_examples=500)
@given(t=_st.all_instances_except_of_type(str, NoneType).filter(bool))
@pytest.mark.slow
@pytest.mark.filterwarnings("ignore:NotImplemented should not be used in a boolean context:DeprecationWarning") # noqa: E501
@pytest.mark.filterwarnings("ignore:The behavior of this method will change .+:FutureWarning") # noqa: E501
def test_base_href(
self, disposable_html_with_base_href: HtmlElement, t: Any
) -> None:
Expand Down

0 comments on commit ba89980

Please sign in to comment.