I have an interrupt handler within a class and following method:
def interruptHandler(self, signal, frame):
""" Catches SIGINT and SIGTERM to allow proper shutdown of all threads etc."""
self.stopWorker()
print("interrupt") # the print message is just for me to see if it works
when I press control + c I get the print message from my interruptHandler, so the method is fine. But when I write an pytest for it I dont know how to assert the SIGINT. And when I want to force the interrupt with
worker.interruptHandler(signal.sigint)
I get an error that I am missing the argument frame.