File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1+ import gc
12import logging
23import os
34import warnings
1819from ipykernel .kernelbase import Kernel
1920from ipykernel .zmqshell import ZMQInteractiveShell
2021
21- # ensure we don't leak History managers
22+ # ensure we don't leak history managers
2223if os .name != "nt" :
2324 HistoryManager ._max_inst = 1
2425
26+
27+ @pytest .fixture (scope = "session" , autouse = True )
28+ def _garbage_collection (request ):
29+ gc .collect ()
30+
31+
2532try :
2633 import resource
2734except ImportError :
Original file line number Diff line number Diff line change 44# Distributed under the terms of the Modified BSD License.
55
66import ast
7- import gc
87import os .path
98import platform
109import signal
@@ -602,7 +601,6 @@ def test_control_thread_priority():
602601
603602
604603def test_sequential_control_messages ():
605- gc .collect ()
606604 with new_kernel () as kc :
607605 msg_id = kc .execute ("import time" )
608606 get_reply (kc , msg_id )
Original file line number Diff line number Diff line change 1- import gc
21import json
32import os
43import threading
@@ -31,7 +30,6 @@ def test_blackhole():
3130
3231
3332def test_start_app ():
34- gc .collect ()
3533 app = IPKernelApp ()
3634 app .kernel = MockKernel ()
3735
You can’t perform that action at this time.
0 commit comments