def test_getLogObserverFile(self):
        logFiles = _patchFileLogObserver(self.patch)
        filename = self.mktemp()
        logger = UnixAppLogger({"logfile": filename})
        observer = logger._getLogObserver()

        self.assertEquals(len(logFiles), 1)
        self.assertEquals(logFiles[0].path,
                          os.path.abspath(filename))

        self.assertEquals(len(self.signals), 1)
        self.assertEquals(self.signals[0][0], signal.SIGUSR1)

        d = Deferred()
        def rotate():
            d.callback(None)
        logFiles[0].rotate = rotate

        rotateLog = self.signals[0][1]
        rotateLog(None, None)
        return d
When C{logfile} contains a file name, L{app.AppLogger._getLogObserver}
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/test_twistd.py/UnixAppLoggerTestCase.test_getLogObserverFile