Skip to content

Commit 38405df

Browse files
committed
try to fix at_exit_once
1 parent 6bea48d commit 38405df

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ async def ipkernel(anyio_backend):
225225
yield kernel
226226
finally:
227227
kernel.destroy()
228-
kernel.shell.history_manager = None
228+
kernel.shell._atexit_once()
229229
kernel.shell.configurables = []
230230
ZMQInteractiveShell.clear_instance()
231231

tests/test_zmq_shell.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def test_magics(tmp_path):
233233
socket.close()
234234
context.destroy()
235235
finally:
236-
shell.history_manager = None
236+
shell._atexit_once()
237237
shell.configurables = []
238238
InteractiveShell.clear_instance()
239239

@@ -258,7 +258,7 @@ def test_zmq_interactive_shell(kernel):
258258
shell.system_piped("dir")
259259
shell.ask_exit()
260260
finally:
261-
shell.history_manager = None
261+
shell._atexit_once()
262262
shell.configurables = []
263263
ZMQInteractiveShell.clear_instance()
264264

0 commit comments

Comments
 (0)