MCPcopy Create free account
hub / github.com/dchevell/flask-executor / test_propagate_exception_callback

Function test_propagate_exception_callback

tests/test_executor.py:255–264  ·  view source on GitHub ↗
(app, caplog)

Source from the content-addressed store, hash-verified

253 assert hasattr(future, 'test')
254
255def test_propagate_exception_callback(app, caplog):
256 caplog.set_level(logging.ERROR)
257 app.config['EXECUTOR_PROPAGATE_EXCEPTIONS'] = True
258 executor = Executor(app)
259 with pytest.raises(NameError):
260 with app.test_request_context('/'):
261 future = executor.submit(fail)
262 assert propagate_exceptions_callback in future._done_callbacks
263 concurrent.futures.wait([future])
264 propagate_exceptions_callback(future)
265
266def test_coerce_config_types(default_app):
267 default_app.config['EXECUTOR_MAX_WORKERS'] = '5'

Callers

nothing calls this directly

Calls 3

submitMethod · 0.95
ExecutorClass · 0.90

Tested by

no test coverage detected