Skip to content

Hypothesis sometimes find errors in test_optimization_constraints[no rig overlaps] #161

@frode-aarstad

Description

@frode-aarstad

It seems like there are some strategies that causes this test to fail. The seed to reproduce this particular error is on the last line of the code block


    )
E   hypothesis.errors.FailedHealthCheck: Input generation is slow: Hypothesis only generated 1 valid inputs after 2.16 seconds (5 invalid inputs).
E   
E              count | fraction |    slowest draws (seconds)
E     values |    6  |    100%  |      --      --   0.001,  0.001,  2.160
E   
E   This could be for a few reasons:
E   1. This strategy could be generating too much data per input. Try decreasing the amount of data generated, for example by decreasing the minimum size of collection strategies like st.lists().
E   2. Some other expensive computation could be running during input generation. For example, if @st.composite or st.data() is interspersed with an expensive computation, HealthCheck.too_slow is likely to trigger. If this computation is unrelated to input generation, move it elsewhere. Otherwise, try making it more efficient, or disable this health check if that is not possible.
E   
E   If you expect input generation to take this long, you can disable this health check with @settings(suppress_health_check=[HealthCheck.too_slow]). See https://hypothesis.readthedocs.io/en/latest/reference/api.html#hypothesis.HealthCheck for details.

tests/jobs/drill_planner/test_optimized_drill_planner.py:63: FailedHealthCheck
------------------------------------------------------------------------------------ Hypothesis ------------------------------------------------------------------------------------
You can add @seed(164491236411345807360009557951617327340) to this test or run pytest with --hypothesis-seed=164491236411345807360009557951617327340 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