Skip to content

Conversation

@tmckenzie51
Copy link
Contributor

@tmckenzie51 tmckenzie51 commented Oct 23, 2020

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

How was it fixed?

emitter fixtures ('emitter', 'Emitter', 'EMITTER', EMITTER_ABI, 'EMITTER_RUNTIME', 'EMITTER_CODE') were changed to have 'module' scope for test_contract_data_filters and function scope otherwise.

Todo:

Cute Animal Picture

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

changes emitter fixtures ('emitter', 'Emitter', 'EMITTER', EMITTER_ABI, 'EMITTER_RUNTIME', 'EMITTER_CODE') to 'module scope for test_contract_data_filters and function scope otherwise.
@tmckenzie51 tmckenzie51 force-pushed the tiffany/emitter-scope branch from 3a42bc7 to 7c9739b Compare October 26, 2020 20:17
@ethereum ethereum deleted a comment Oct 28, 2020
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.

Looking good 💥 !

removes web3(request) fixture from test_contract_buildTransaction.py
@tmckenzie51 tmckenzie51 force-pushed the tiffany/emitter-scope branch from 4d7c010 to 8d51484 Compare October 29, 2020 19:08
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!

@tmckenzie51 tmckenzie51 merged commit d3c23f8 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