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
Remove the ability to run a single shrink pass #2033
Conversation
@@ -1539,25 +1518,6 @@ def shrinker(data): | |||
assert shrinker.calls <= 60 | |||
|
|||
|
|||
def test_zero_examples_does_not_try_to_adapt_across_different_sizes(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this test because I couldn't figure out a sensible way to adapt it and it seemed fragile and hyper-specific.
|
||
def run(self): | ||
return self.run_shrink_pass(definition.name) | ||
assert False, "Shrink passes should not be run directly" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what's causing the coverage failure, so presumably it just needs to be suppressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. I thought the assert False
was automatically a coverage exclusion. Oh well, easy enough to add the pragma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
This function was only used for testing, and was about to become more awkward to support in some changes I have planned, so this removes it entirely and makes it an error to call a shrink pass directly.