Skip to content

Commit

Permalink
Remove test_enter_eventloop
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Feb 1, 2023
1 parent 4f84388 commit 28d6938
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
- name: Run the tests
timeout-minutes: 10
run: pytest -k test_enter_eventloop -W default -vv || pytest -k test_enter_eventloop --vv -W default --lf
run: pytest -W default -vv || pytest --vv -W default --lf

test_miniumum_versions:
name: Test Minimum Versions
Expand Down
1 change: 0 additions & 1 deletion ipykernel/kernelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ def advance_eventloop():
return
self.log.debug("Advancing eventloop %s", eventloop)
try:
foo
eventloop(self)
except KeyboardInterrupt:
# Ctrl-C shouldn't crash the kernel
Expand Down
21 changes: 0 additions & 21 deletions ipykernel/tests/test_kernel_direct.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,27 +132,6 @@ def __init__(self, bytes):
await kernel.dispatch_shell(msg)


async def test_enter_eventloop(kernel):
kernel.eventloop = None
kernel.enter_eventloop()
kernel.eventloop = asyncio.get_running_loop()
kernel.enter_eventloop()
called = 0

def check_status():
nonlocal called
if called == 0:
msg = kernel.session.msg("debug_request", {})
kernel.msg_queue.put(msg)
called += 1
kernel.io_loop.call_later(0.001, check_status)

kernel.io_loop.call_later(0.001, check_status)
kernel.start()
while called < 2:
await asyncio.sleep(0.1)


async def test_do_one_iteration(kernel):
kernel.msg_queue = asyncio.Queue()
await kernel.do_one_iteration()
Expand Down

0 comments on commit 28d6938

Please sign in to comment.