Fixtures provide quick access to custom Brownie objects frequently used throughout testing. Visit the Brownie Documentation for more detail and the PyTest Documentation for additional background.
PyTest fixtures are located in tests/conftest.py
Fixtures are created by prepending the function with the fixture decorator
@pytest.fixture
def my_fixture():
...
The scope of the fixture can be passed to determine when the fixture is destroyed.
@pytest.fixture(scope=_scope_)
def my_fixture():
...
- function: (default) fixture destroyed at end of test
- class: fixture destroyed at last test in class
- module: fixture destroyed at last test in module
- session: fixture destroyed at end of test session
After being created once, Brownie stores a copy of contracts in a local database that persists between sessions
Contract used to locate all active Curve contracts and perform high level interactions. More information at the Documentation. The active address may change and can be retrieved from the permanent Address Provider contract
Core Curve pool allowing staking and transactions among DAI, USDC, and Tether stablecoins. DAI is a decentralized stablecoin currently pegged to the value of the US dollar created by MakerDAO