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

Bugfix/hypothesis given doesnt work with fixture #513

Merged
merged 2 commits into from
Apr 14, 2022

Conversation

jwwwb
Copy link
Contributor

@jwwwb jwwwb commented Apr 13, 2022

Describe changes

Prior to version 6.43 of hypothesis, the functions marked with both @given and @fixture were silently skipped. This version failed with an exception in that case. Fixing this to make the functions actually run as test cases revealed that 2 of them were broken in the first place. This PR fixes one of the broken tests, and removes the other because it was not useful.

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to docs, I have updated the documentation accordingly.
  • If I have added an integration, I have updated the integrations table.
  • I have added tests to cover my changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

@jwwwb jwwwb requested a review from strickvl April 13, 2022 15:23
@github-actions github-actions bot added internal To filter out internal PRs and issues bug Something isn't working labels Apr 13, 2022
Copy link
Contributor

@strickvl strickvl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nice fix. Thank you for taking the time!

@@ -80,7 +80,7 @@ pre-commit = "^2.14.0"
autoflake = "^1.4"
pyment = "^0.3.3"
tox = "^3.24.3"
hypothesis = "^6.23.0"
hypothesis = "^6.43.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the HealthCheck part of a later version?

Copy link
Contributor Author

@jwwwb jwwwb Apr 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the healthcheck had also existed in the previous version, but it was supressed by the pytest.fixture decorator. the newer version exposed the healthcheck and thus forced me to supress it in the settings decorator instead.
considering how the newer version exposes such issues, I thought it would make sense to upgrade it for everybody

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@jwwwb jwwwb merged commit be3e3cb into develop Apr 14, 2022
@jwwwb jwwwb deleted the bugfix/hypothesis-given-doesnt-work-with-fixture branch April 14, 2022 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internal To filter out internal PRs and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants