Skip to content

Commit 486050f

Browse files
authored
Try to debug non-closed iopub socket (#1345)
1 parent fe96a1b commit 486050f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_connect.py

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

2020
from .utils import TemporaryWorkingDirectory
2121

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

0 commit comments

Comments
 (0)