def test_hotshotPrintStatsError(self):
        class ErroneousStats(pstats.Stats):
            def print_stats(self):
                raise RuntimeError("Boom")
        self.patch(pstats, "Stats", ErroneousStats)

        config = twistd.ServerOptions()
        config["profile"] = self.mktemp()
        config["profiler"] = "hotshot"
        profiler = app.AppProfiler(config)
        reactor = DummyReactor()

        oldStdout = sys.stdout
        self.assertRaises(RuntimeError, profiler.run, reactor)
        self.assertIdentical(sys.stdout, oldStdout)
mouseReleaseEvent(e: QEvent) -> None
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/test_twistd.py/AppProfilingTestCase.test_hotshotPrintStatsError--crossover with--dataset/ETHPy150Open VisTrails/VisTrails/contrib/SCIRun/cm2viewcell.py/QCM2ViewWidget.mouseReleaseEvent