def test_runnerExitsWithSignal(self):
        """
        _exitWithSignal is called when the runner exits with a signal.
        """
        self.patch(
            twistd,
            '_SomeApplicationRunner',
            stubApplicationRunnerFactoryCreator(signal.SIGINT)
        )
        twistd.runApp(self.config)
        self.assertEquals(self.fakeKillArgs[0], os.getpid())
        self.assertEquals(self.fakeKillArgs[1], signal.SIGINT)

        _exitWithSignal is called when the runner exits with a signal.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_twistd.py