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

specifies 'module' scope for relevant pytest fixtures #1767

Merged

Conversation

tmckenzie51
Copy link
Contributor

@tmckenzie51 tmckenzie51 commented Oct 8, 2020

specifies 'module' scope for pytest fixtures 'emitter_event_ids', 'w3_strict_abi', and 'create_filter'.

What was wrong?

At the end of our tests we have hypothesis deprecation warnings that look like - HypothesisDeprecationWarning: tests/core/utilities/test_event_filter_builder.py::test_match_any_bytes_type_properties uses the 'web3' fixture, which is reset between function calls but not between test cases generated by @given(...). You can change it to a module- or session-scoped fixture if it is safe to reuse; if not we recommend using a context manager inside your test function. See https://docs.pytest.org/en/latest/fixture.html#sharing-test-data for details on fixture scope.

Related to Issue #1729 and PR #1766

How was it fixed?

'module' scope was specified for pytest fixtures 'Emitter', 'emitter_event_ids', and 'w3_strict_abi' pytest fixtures.

Todo:

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@tmckenzie51 tmckenzie51 force-pushed the hypothesis-dep-warnings-module-scope branch from 7a8b817 to 614b835 Compare October 9, 2020 20:34
Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

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

LGTM! I would probably rebase this down to one commit, and then once you add the release notes and the tests pass, you can merge! 🚢

@tmckenzie51 tmckenzie51 force-pushed the hypothesis-dep-warnings-module-scope branch from 614b835 to f3b534b Compare October 16, 2020 19:55
specifies 'module' scope for pytest fixtures 'Emitter', 'emitter_event_ids', and 'w3_strict_abi'.
@tmckenzie51 tmckenzie51 force-pushed the hypothesis-dep-warnings-module-scope branch from e24a1ea to 4cb4ebf Compare October 28, 2020 15:52
Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

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

Nice! As soon as this has a release note, I'd say it's ready to be merged!

@tmckenzie51 tmckenzie51 merged commit e6621b3 into ethereum:master Oct 29, 2020
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.

2 participants