The test
package contains classes and methods for running tests and evaluating test coverage.
This functionality is typically accessed via pytest. See test
.
The plugin
module contains classes and methods used in the Brownie Pytest plugin. It defines custom fixtures and handles integration into the Pytest workflow.
Brownie includes the following fixtures for use with pytest
.
Note
These fixtures are only available when pytest is run from inside a Brownie project folder.
These fixtures provide access to objects related to the project being tested.
These fixtures are used to effectively isolate tests. If included on every test within a module, that module may now be skipped via the --update
flag when none of the related files have changed since it was last run.
These fixtures alter the behaviour of tests when coverage evaluation is active.
The RevertContextManager
closely mimics the behaviour of pytest.raises.
The output
module contains methods for formatting and displaying test output.
The coverage
module is used storing and accessing coverage evaluation data.
The _manager
module contains the TestManager
class, used internally by Brownie to determine which tests should run and to load and save the test results.