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

Remove the ability to run a single shrink pass #2033

Merged
merged 4 commits into from Jul 3, 2019

Conversation

DRMacIver
Copy link
Member

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.

@@ -1539,25 +1518,6 @@ def shrinker(data):
assert shrinker.calls <= 60


def test_zero_examples_does_not_try_to_adapt_across_different_sizes():
Copy link
Member Author

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"
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

@Zalathar Zalathar left a 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.

@DRMacIver DRMacIver merged commit c3c2822 into master Jul 3, 2019
@DRMacIver DRMacIver deleted the DRMacIver/remove-run-shrink-pass branch July 3, 2019 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants