From 10fa206fc851b1412e1631a017ca1003754e83ec Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Mon, 29 Jan 2024 15:04:42 +0100 Subject: [PATCH] Disable fast mode, clear env contracts --- tests/conftest.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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):