def setUp(self):
        """
        Fake C{signal.signal} for not installing the handlers but saving them
        in C{self.signals}.
        """
        self.signals = []

        def fakeSignal(sig, f):
            self.signals.append((sig, f))

        self.patch(signal, "signal", fakeSignal)

        Fake C{signal.signal} for not installing the handlers but saving them
        in C{self.signals}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_twistd.py