def test_cleanup_context_error(self):
        config = {'hooks': [{'name': 'see.test.environment_test.WrongHook'}]}
        with Environment(wrong_context_factory, config) as environment:
            context = environment.context
        self.assertTrue(context.clean)
Errors in context cleanup are handled.
dataset/ETHPy150Open F-Secure/see/see/test/environment_test.py/EnvironmentTest.test_cleanup_context_error