Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tests are failing due to hypothesis filtering #186

Open
@mtelka

Description

I do see three test failures with the same error reported:

__________ TestHypothesisStrategies.test_hostname_labels_valid_ascii ___________
self = <hyperlink.test.test_hypothesis.TestHypothesisStrategies testMethod=test_hostname_labels_valid_ascii>
 @given(hostname_labels(allow_idn=False))
> def test_hostname_labels_valid_ascii(self, label):
E hypothesis.errors.FailedHealthCheck: It looks like this test is filtering out a lot of inputs. 8 inputs were generated successfully, while 50 inputs were filtered out.
E 
E An input might be filtered out by calls to assume(), strategy.filter(...), or occasionally by Hypothesis internals.
E 
E Applying this much filtering makes input generation slow, since Hypothesis must discard inputs which are filtered out and try generating it again. It is also possible that applying this much filtering will distort the domain and/or distribution of the test, leaving your testing less rigorous than expected.
E
E If you expect this many inputs to be filtered out during generation, you can disable this health check with @settings(suppress_health_check=[HealthCheck.filter_too_much]). See https://hypothesis.readthedocs.io/en/latest/reference/api.html#hypothesis.HealthCheck for details.
src/hyperlink/test/test_hypothesis.py:126: FailedHealthCheck
---------------------------------- Hypothesis ----------------------------------
You can add @seed(116461503814248224408486686781843716136) to this test or run pytest with --hypothesis-seed=116461503814248224408486686781843716136 to reproduce this failure.
________________ TestHypothesisStrategies.test_hostnames_ascii _________________
self = <hyperlink.test.test_hypothesis.TestHypothesisStrategies testMethod=test_hostnames_ascii>
 @given(hostnames(allow_idn=False))
> def test_hostnames_ascii(self, hostname):
E hypothesis.errors.FailedHealthCheck: It looks like this test is filtering out a lot of inputs. 6 inputs were generated successfully, while 50 inputs were filtered out.
E
E An input might be filtered out by calls to assume(), strategy.filter(...), or occasionally by Hypothesis internals.
E
E Applying this much filtering makes input generation slow, since Hypothesis must discard inputs which are filtered out and try generating it again. It is also possible that applying this much filtering will distort the domain and/or distribution of the test, leaving your testing less rigorous than expected.
E
E If you expect this many inputs to be filtered out during generation, you can disable this health check with @settings(suppress_health_check=[HealthCheck.filter_too_much]). See https://hypothesis.readthedocs.io/en/latest/reference/api.html#hypothesis.HealthCheck for details.
src/hyperlink/test/test_hypothesis.py:162: FailedHealthCheck
---------------------------------- Hypothesis ----------------------------------
You can add @seed(122086611077758224883304239040414256859) to this test or run pytest with --hypothesis-seed=122086611077758224883304239040414256859 to reproduce this failure.
_____________ TestHypothesisStrategies.test_hostnames_ascii_nolead _____________
self = <hyperlink.test.test_hypothesis.TestHypothesisStrategies testMethod=test_hostnames_ascii_nolead>
 @given(hostnames(allow_leading_digit=False, allow_idn=False))
> def test_hostnames_ascii_nolead(self, hostname):
E hypothesis.errors.FailedHealthCheck: It looks like this test is filtering out a lot of inputs. 0 inputs were generated successfully, while 50 inputs were filtered out.
E
E An input might be filtered out by calls to assume(), strategy.filter(...), or occasionally by Hypothesis internals.
E
E Applying this much filtering makes input generation slow, since Hypothesis must discard inputs which are filtered out and try generating it again. It is also possible that applying this much filtering will distort the domain and/or distribution of the test, leaving your testing less rigorous than expected.
E
E If you expect this many inputs to be filtered out during generation, you can disable this health check with @settings(suppress_health_check=[HealthCheck.filter_too_much]). See https://hypothesis.readthedocs.io/en/latest/reference/api.html#hypothesis.HealthCheck for details.
src/hyperlink/test/test_hypothesis.py:177: FailedHealthCheck
---------------------------------- Hypothesis ----------------------------------
You can add @seed(265092412803701260153578618770534088842) to this test or run pytest with --hypothesis-seed=265092412803701260153578618770534088842 to reproduce this failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /