Skip to content

fix pytest test failures #4434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 10, 2025
Merged

fix pytest test failures #4434

merged 3 commits into from
Jun 10, 2025

Conversation

tybug
Copy link
Member

@tybug tybug commented Jun 9, 2025

Closes #4432.

The healthcheck traceback adds a new marker line. Here's the diff:

=================================== FAILURES ===================================
_____________________ test_healthcheck_traceback_is_hidden _____________________

    @given(integers().map(lambda x: time.sleep(0.2)))
 >   def test_healthcheck_traceback_is_hidden(x):
+                   ^^^
E   hypothesis.errors.FailedHealthCheck: Data generation is extremely slow: Only produced 5 valid examples in 1.02 seconds (0 invalid ones and 0 exceeded maximum size). Try decreasing size of the data you're generating (with e.g. max_size or max_leaves parameters).
E         count | fraction |    slowest draws (seconds)
E     x |    5  |    100%  |   0.203,  0.203,  0.203,  0.203,  0.205
E   See https://hypothesis.readthedocs.io/en/latest/reference/api.html#hypothesis.HealthCheck for more information about this. If you want to disable just this health check, add HealthCheck.too_slow to the suppress_health_check settings for this test.

test_healthcheck_traceback_is_hidden.py:5: FailedHealthCheck
 ---------------------------------- Hypothesis ----------------------------------
You can add @seed(44133051342172786532243155379846778193) to this test or run pytest with --hypothesis-seed=44133051342172786532243155379846778193 to reproduce this failure.
=========================== short test summary info ============================
FAILED test_healthcheck_traceback_is_hidden.py::test_healthcheck_traceback_is_hidden
============================== 1 failed in 1.34s ===============================

This does not point at the correct location, but this isn't the first time our traceback adjustments have caused problems with these error location markers.

@tybug tybug force-pushed the pytest-compat branch 2 times, most recently from e541441 to d18585f Compare June 9, 2025 21:41
@tybug tybug merged commit ad76688 into HypothesisWorks:master Jun 10, 2025
61 checks passed
@tybug tybug deleted the pytest-compat branch June 10, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants