treebeardtech / nbmake

📝 Pytest plugin for testing notebooks
https://pypi.org/project/nbmake/
Apache License 2.0
182 stars 18 forks source link

Test session with `nbmake` doesn't terminate on keyboard interrupt #45

Open jklaise opened 2 years ago

jklaise commented 2 years ago

Describe the bug A running test session with e.g.pytest --nbmake *.ipynb cannot be terminated with Ctrl-C, the nbmake . The only way to terminate the test session was to kill the pytest process with SIGKILL.

To Reproduce Run test session on multiple notebooks with a glob:

pytest --nbmake *.ipynb

Then try to terminate it with Ctrl+C.

alex-treebeard commented 1 year ago

Apologies I never replied to this one, I'm aware the nbclient spins up subprocesses to emulate the notebook environment. It's likely we are not handling the SIGKILL signal correctly which is causing it to hang.

This would be a good quality of life improvement and requires a bit of investigation as to how we solve it.