Skip to content

Commit

Permalink
Disable fast mode, clear env contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchiavini committed Jan 29, 2024
1 parent 3ab3e37 commit 10fa206
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 10fa206

Please sign in to comment.