-
-
Notifications
You must be signed in to change notification settings - Fork 833
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
Reworked test and deploy documentation #1497
Conversation
- Split documentation for testing and deploying a contract - Completely revamped documentation for testing to use pytest and eth_tester. Complete with examples. - Updated documentation for deploying contracts - Added two new examples of very simple storage contracts that are used in the testing documentation - Added two new test files for said storage contracts - Updated the assert_tx_failed fixture in conftest with another optional argument to check for text in exceptions (so we can check for a specific ValidationError for example)
- Split documentation for testing and deploying a contract - Completely revamped documentation for testing to use pytest and eth_tester. Complete with examples. - Updated documentation for deploying contracts - Added two new examples of very simple storage contracts that are used in the testing documentation - Added two new test files for said storage contracts - Updated the assert_tx_failed fixture in conftest with another optional argument to check for text in exceptions (so we can check for a specific ValidationError for example)
- Split documentation for testing and deploying a contract - Completely revamped documentation for testing to use pytest and eth_tester. Complete with examples. - Updated documentation for deploying contracts - Added two new examples of very simple storage contracts that are used in the testing documentation - Added two new test files for said storage contracts - Updated the assert_tx_failed fixture in conftest with another optional argument to check for text in exceptions (so we can check for a specific ValidationError for example)
- Split documentation for testing and deploying a contract - Completely revamped documentation for testing to use pytest and eth_tester. Complete with examples. - Updated documentation for deploying contracts - Added two new examples of very simple storage contracts that are used in the testing documentation - Added two new test files for said storage contracts - Updated the assert_tx_failed fixture in conftest with another optional argument to check for text in exceptions (so we can check for a specific ValidationError for example)
docs/testing-contracts.rst
Outdated
|
||
.. code-block:: python | ||
|
||
import pytest |
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.
Perhaps we should consider splitting our existing conftest.py into base_conftest.py and conftest.py which we can include here and it will stay up to date. In our existing conftest.py we just import the base functionality ;)
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.
Good idea. I'll make a proposition for this tomorrow and add it to the PR
Very cool! |
Now that we include concrete examples, I definitely think doctest should be used. This PR need not depend on that though, but that should be a next step. Edit: do Jacques's request instead. But still, should add doctest for features described in docs. |
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.
LGTM pending @jacqueswww's comment
Is someone already working on doctests? |
No, but it's here: #1233 This issue doesn't depend on doctests, but we really should add them to prevent out of date syntax being used in the docs. |
test.base_conftest is not a plugin. base_conftest.py includes the base to start testing vyper contracts while conftest.py includes all the other fixtures and functions needed to test our code.
Updated PR with request |
What I did
Work on issue #1481
UPDATE:
How I did it
Modifying the .rst doc files and creating new example contracts with tests
How to verify it
Proof read the documentation and check the contracts (they are simple dummy contracts to showcase testing)
Description for the changelog
Updated documentation for testing and deploying contracts.
Cute Animal Picture