diff --git a/tests/conftest.py b/tests/conftest.py index f454c2b9..67fa3b95 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -19,10 +19,21 @@ @pytest.fixture(autouse=True) -def fast_mode(): - boa.env.enable_fast_mode() +def boa_setup(): + import tracemalloc + + tracemalloc.start() + snapshot = tracemalloc.take_snapshot() + # boa.env.enable_fast_mode() yield + boa.env._contracts.clear() + boa.env._code_registry.clear() boa.reset_env() + snapshot2 = tracemalloc.take_snapshot() + top_stats = snapshot2.compare_to(snapshot, "lineno") + print("[ Top 10 differences ]") + for stat in top_stats[:10]: + print(stat) def pytest_generate_tests(metafunc):