Skip to content
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

Failed assertion when verbosity is quiet #2696

Closed
orsinium opened this issue Dec 10, 2020 · 0 comments · Fixed by #2697
Closed

Failed assertion when verbosity is quiet #2696

orsinium opened this issue Dec 10, 2020 · 0 comments · Fixed by #2697
Assignees
Labels
bug something is clearly wrong here

Comments

@orsinium
Copy link

Code:

import hypothesis
import hypothesis.strategies

@hypothesis.example(None)
@hypothesis.settings(verbosity=hypothesis.Verbosity.quiet)
@hypothesis.given(hypothesis.strategies.integers())
def f(a):
    pass

f()

Failure:

Traceback (most recent call last):
  File "tmp.py", line 10, in <module>
    f()
  File "tmp.py", line 5, in f
    @hypothesis.settings(verbosity=hypothesis.Verbosity.quiet)
  File "/home/gram/.local/lib/python3.8/site-packages/hypothesis/core.py", line 1090, in wrapped_test
    errors = list(
  File "/home/gram/.local/lib/python3.8/site-packages/hypothesis/core.py", line 379, in execute_explicit_examples
    assert fragments_reported[0].startswith("Falsifying example")
IndexError: list index out of range

Reason: execute_explicit_examples assumes that there are fragments_reported but there are always none if the verbosity is quiet.

@Zac-HD Zac-HD added the bug something is clearly wrong here label Dec 10, 2020
@Zac-HD Zac-HD self-assigned this Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something is clearly wrong here
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants