def test_withoutCProfile(self):
        savedModules = sys.modules.copy()
        sys.modules["cProfile"] = None

        config = twistd.ServerOptions()
        config["profiler"] = "cProfile"
        profiler = app.AppProfiler(config)
        try:
            self.assertRaises(SystemExit, profiler.run, None)
        finally:
            sys.modules.clear()
            sys.modules.update(savedModules)
Returns the (width, height) of an image, given an open file or a path.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/test_twistd.py/AppProfilingTestCase.test_withoutCProfile--crossover with--dataset/ETHPy150Open dcramer/django-compositepks/django/core/files/images.py/get_image_dimensions