Skip to content

Improvements to tests #13

@iamdefinitelyahuman

Description

@iamdefinitelyahuman

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.py files are sometimes 3 folders deep, and individual tests declare their own fixtures
  • Objects such as accounts are being imported that could instead be retrieved as fixtures
  • Test file organization could be improved

How to Fix

  • Add verbose comments within tests/conftest.py explaining what each fixture does
  • Reorganize fixtures - avoid declaring them within a test file, keep conftest.py files at most 1 subfolder beyond tests
  • handle imports as fixtures where possible
  • produce more subfolder README.md files 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    high priorityDeal with me right away!structureRefactoring, code quality, organization...testsRelated to unit tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions