specifies 'module' scope for relevant pytest fixtures #1767
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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