def test_unknownProfiler(self):
        """
        Check that L{app.AppProfiler} raises L{SystemExit} when given an
        unknown profiler name.
        """
        config = twistd.ServerOptions()
        config["profile"] = self.mktemp()
        config["profiler"] = "foobar"

        error = self.assertRaises(SystemExit, app.AppProfiler, config)
        self.assertEqual(str(error), "Unsupported profiler name: foobar")

        Check that L{app.AppProfiler} raises L{SystemExit} when given an
        unknown profiler name.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_twistd.py