-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Moved account to BaseEth #2582
Moved account to BaseEth #2582
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dbfreem! Before this gets merged, we'll need to add a few tests. If you want to/have time to add them, that would be great! Otherwise someone from the team can pick it up!
You should be able to pretty much wholesale copy/paste tests/core/eth-module/test_async_accounts.py
, but where you have your async_w3
fixture defined, you'll need to pass in the AsyncEth
module. So instead of this line it should look something like:
return Web3(AsyncEthereumTesterProvider(), modules={"eth", (AsyncEth,)})
@kclowes So, I did some thinking about the test here. Two things I thought of.
Just my thoughts so feel free to say "yes, we want both the AsynEth and Eth test in web3.py for account". :) haha. |
Thanks for the comments!
They are covered over there as well, but I think it's good to make sure we can access the most important methods through
That's a good idea. I think it would be good to have at least one "happy path" test for each |
@kclowes I made the suggested changes, take a look and let me know what you think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a comment just to make sure we have decent assumptions for the testing around this. It would be good to add this feature to the async docs too but I can do that before merging if you'd like. Just let me know.
Thanks for the PR 👌
@fselmo I made the suggested changes. Copied your test into test_account.py, and made the doc changes. |
lgtm! I just organized async at the bottom so it's a bit easier to read. Ty 👍🏼... I'll merge as soon as tests pass |
bc64d1a
to
e619ebf
Compare
- Moved account test to BaseEth, created one test for AsyncEth.account and Eth.account - Update docs: added link to eth ``account`` in async provider - Added additional eth ``account`` test - Added newsfragment
e619ebf
to
730ff30
Compare
- Move ``account`` to ``BaseEth`` so it can be accessed by both ``Eth`` and ``AsyncEth``
- Move ``account`` to ``BaseEth`` so it can be accessed by both ``Eth`` and ``AsyncEth``
- Move ``account`` to ``BaseEth`` so it can be accessed by both ``Eth`` and ``AsyncEth``
- Move ``account`` to ``BaseEth`` so it can be accessed by both ``Eth`` and ``AsyncEth``
What was wrong?
Make account accessible in AsyncEth
closes #2580
How was it fixed?
Move Eth.account to BaseEth so that it can be used in AsyncEth.
Todo: