Skip to content

Commit

Permalink
dont crash on pypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Feb 19, 2025
1 parent 0139eb7 commit 6fcdbfe
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/test_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@

@pytest.fixture(scope="module", autouse=True)
def _enable_tracemalloc():
import tracemalloc

tracemalloc.start()
try:
import tracemalloc
except ModuleNotFoundError:
# pypy
tracemalloc = None
if tracemalloc is not None:
tracemalloc.start()
yield
tracemalloc.stop()
if tracemalloc is not None:
tracemalloc.stop()


sample_info: dict = {
Expand Down

0 comments on commit 6fcdbfe

Please sign in to comment.