diff --git a/boa/test/plugin.py b/boa/test/plugin.py index bfddd6cd..85544f3b 100644 --- a/boa/test/plugin.py +++ b/boa/test/plugin.py @@ -1,5 +1,4 @@ import contextlib -import warnings from typing import Generator import hypothesis @@ -51,23 +50,6 @@ def pytest_collection_modifyitems(config, items): item.add_marker("gas_profile") -_fixture_map = {} - - -def pytest_fixture_setup(fixturedef, request): - ctx = boa.env.anchor() - assert id(fixturedef) not in _fixture_map, "bad invariant" - _fixture_map[id(fixturedef)] = ctx - ctx.__enter__() - - -def pytest_fixture_post_finalizer(fixturedef, request): - if (ctx := _fixture_map.pop(id(fixturedef), None)) is not None: - ctx.__exit__(None, None, None) - else: - warnings.warn("possible bug in titanoboa! bad fixture tracking", stacklevel=1) - - @pytest.hookimpl(hookwrapper=True) def pytest_runtest_call(item: pytest.Item) -> Generator: ignore_isolation = item.get_closest_marker("ignore_isolation") is not None diff --git a/tests/unitary/test_isolation.py b/tests/unitary/test_isolation.py index 7721a298..164acaa8 100644 --- a/tests/unitary/test_isolation.py +++ b/tests/unitary/test_isolation.py @@ -66,16 +66,3 @@ def setup_ignore_isolation(boa_contract): def test_check_ignore_isolation(boa_contract, setup_ignore_isolation): assert boa_contract.a() == 42069 assert boa_contract.b() == addr_constn - - -@pytest.fixture(scope="function") -def modify_boa_contract(boa_contract): - # these values spill over from the previous test - assert boa_contract.a() == 42069 - assert boa_contract.b() == addr_constn - boa_contract.set_vars(boa_contract.a() + 1, boa.env.generate_address()) - - -@pytest.mark.parametrize("a", range(10)) -def test_fixture_isolation(modify_boa_contract, a): - pass