Skip to content

Commit 377c0a7

Browse files
test: fix fixture scope
1 parent b91ca37 commit 377c0a7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/stableborrow/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def stablecoin(stablecoin_pre, admin):
2727
return stablecoin_pre.deploy('Curve USD', 'crvUSD')
2828

2929

30-
@pytest.fixture(scope="session")
30+
@pytest.fixture(scope="module")
3131
def weth(admin):
3232
with boa.env.prank(admin):
3333
return WETH_DEPLOYER.deploy()
@@ -44,13 +44,13 @@ def controller_prefactory(controller_factory_impl, stablecoin, weth, admin, acco
4444
return controller_factory_impl.deploy(stablecoin.address, admin, accounts[0], weth.address)
4545

4646

47-
@pytest.fixture(scope="session")
47+
@pytest.fixture(scope="module")
4848
def controller_impl(admin):
4949
with boa.env.prank(admin):
5050
return MINT_CONTROLLER_DEPLOYER.deploy_as_blueprint()
5151

5252

53-
@pytest.fixture(scope="session")
53+
@pytest.fixture(scope="module")
5454
def amm_impl(admin):
5555
with boa.env.prank(admin):
5656
return AMM_DEPLOYER.deploy_as_blueprint()
@@ -64,7 +64,7 @@ def controller_factory(controller_prefactory, amm_impl, controller_impl, stablec
6464
return controller_prefactory
6565

6666

67-
@pytest.fixture(scope="session")
67+
@pytest.fixture(scope="module")
6868
def monetary_policy(admin):
6969
with boa.env.prank(admin):
7070
policy = CONSTANT_MONETARY_POLICY_DEPLOYER.deploy(admin)

tests/swap/conftest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,32 @@
99
from tests.utils.constants import ZERO_ADDRESS
1010

1111

12-
@pytest.fixture(scope="session")
12+
@pytest.fixture(scope="module")
1313
def swap_impl(admin):
1414
with boa.env.prank(admin):
1515
return STABLESWAP_DEPLOYER.deploy()
1616

1717

18-
@pytest.fixture(scope="session")
18+
@pytest.fixture(scope="module")
1919
def swap_deployer(swap_impl, admin):
2020
with boa.env.prank(admin):
2121
deployer = SWAP_FACTORY_DEPLOYER.deploy(swap_impl.address)
2222
return deployer
2323

2424

25-
@pytest.fixture(scope="session")
25+
@pytest.fixture(scope="module")
2626
def redeemable_coin(admin):
2727
with boa.env.prank(admin):
2828
return ERC20_MOCK_DEPLOYER.deploy(6)
2929

3030

31-
@pytest.fixture(scope="session")
31+
@pytest.fixture(scope="module")
3232
def volatile_coin(admin):
3333
with boa.env.prank(admin):
3434
return ERC20_MOCK_DEPLOYER.deploy(18)
3535

3636

37-
@pytest.fixture(scope="session")
37+
@pytest.fixture(scope="module")
3838
def swap(swap_deployer, swap_impl, redeemable_coin, volatile_coin, admin):
3939
with boa.env.prank(admin):
4040
n = swap_deployer.n()
@@ -47,7 +47,7 @@ def swap(swap_deployer, swap_impl, redeemable_coin, volatile_coin, admin):
4747
return swap
4848

4949

50-
@pytest.fixture(scope="session")
50+
@pytest.fixture(scope="module")
5151
def swap_w_d(swap, redeemable_coin, volatile_coin, accounts, admin):
5252
with boa.env.prank(admin):
5353
boa.deal(redeemable_coin, admin, 10**6 * 10**6)

0 commit comments

Comments
 (0)