Unittest with server.handle_exit(sig=signal.SIGINT, frame=None) fails due to KeyboardInterrupt #2455
Unanswered
HenningDinero
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to write a unittest for a PR I'm making.
I do struggle on how to test some-signal handling. The following test raises a "KeyboardInterrupt" error
I assume it is due to
await server.shutdown()
intest.utils run_server
that creates a force-exit since a SIGINT has been raised already.The test passes if the last
sleep
is removed.Beta Was this translation helpful? Give feedback.
All reactions