Skip to content

Commit dc45243

Browse files
Carreauianthomas23
authored andcommitted
Try to debug non-closed iopub socket (#1345)
1 parent 2c7cf9d commit dc45243

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/test_connect.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@
1818

1919
from .utils import TemporaryWorkingDirectory
2020

21+
22+
@pytest.fixture(scope="module", autouse=True)
23+
def _enable_tracemalloc():
24+
try:
25+
import tracemalloc
26+
except ModuleNotFoundError:
27+
# pypy
28+
tracemalloc = None
29+
if tracemalloc is not None:
30+
tracemalloc.start()
31+
yield
32+
if tracemalloc is not None:
33+
tracemalloc.stop()
34+
35+
2136
sample_info: dict = {
2237
"ip": "1.2.3.4",
2338
"transport": "ipc",

0 commit comments

Comments
 (0)