def test_getLogObserverDontOverrideSignalHandler(self):
        """
        If a signal handler is already installed,
        L{UnixAppLogger._getLogObserver} doesn't override it.
        """
        def fakeGetSignal(sig):
            self.assertEqual(sig, signal.SIGUSR1)
            return object()
        self.patch(signal, "getsignal", fakeGetSignal)
        filename = self.mktemp()
        logger = UnixAppLogger({"logfile": filename})
        logger._getLogObserver()

        self.assertEqual(self.signals, [])

        If a signal handler is already installed,
        L{UnixAppLogger._getLogObserver} doesn't override it.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_twistd.py