def test_doStopLoggingStatement(self):
        events = []
        globalLogPublisher.addObserver(events.append)
        self.addCleanup(
            lambda: globalLogPublisher.removeObserver(events.append))

        class MyFactory(Factory):
            numPorts = 1

        f = MyFactory()
        f.doStop()

        self.assertIs(events[0]['factory'], f)
        self.assertEqual(events[0]['log_level'], LogLevel.info)
        self.assertEqual(events[0]['log_format'],
                         'Stopping factory {factory!r}')
Dead Bodies Registry
dataset/ETHPy150Open twisted/twisted/twisted/internet/test/test_protocol.py/FactoryTests.test_doStopLoggingStatement--crossover with--dataset/ETHPy150Open sahana/eden/controllers/dvi.py/body