-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
high priorityDeal with me right away!Deal with me right away!structureRefactoring, code quality, organization...Refactoring, code quality, organization...testsRelated to unit testsRelated to unit tests
Description
The Issues
- The tests use many fixtures that inherit one another - it's a very powerful setup but not easy to understand at first glance.
conftest.pyfiles are sometimes 3 folders deep, and individual tests declare their own fixtures- Objects such as
accountsare being imported that could instead be retrieved as fixtures - Test file organization could be improved
How to Fix
- Add verbose comments within
tests/conftest.pyexplaining what each fixture does - Reorganize fixtures - avoid declaring them within a test file, keep
conftest.pyfiles at most 1 subfolder beyondtests - handle imports as fixtures where possible
- produce more subfolder
README.mdfiles to make tests easier to navigate
The ultimate goal is to make the test suite understandable even to someone who has never seen ZAP before, so it can be linked to from the Brownie docs as an example of what is possible.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
high priorityDeal with me right away!Deal with me right away!structureRefactoring, code quality, organization...Refactoring, code quality, organization...testsRelated to unit testsRelated to unit tests