MCPcopy
hub / github.com/pallets/flask / test_help_echo_exception

Function test_help_echo_exception

tests/test_cli.py:428–443  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

426
427
428def test_help_echo_exception():
429 def create_app():
430 raise Exception("oh no")
431
432 cli = FlaskGroup(create_app=create_app)
433
434 try:
435 runner = CliRunner(mix_stderr=False)
436 except (DeprecationWarning, TypeError):
437 # Click >= 8.2
438 runner = CliRunner()
439
440 result = runner.invoke(cli, ["--help"])
441 assert result.exit_code == 0
442 assert "Exception: oh no" in result.stderr
443 assert "Usage:" in result.stdout
444
445
446class TestRoutes:

Callers

nothing calls this directly

Calls 2

FlaskGroupClass · 0.90
invokeMethod · 0.45

Tested by

no test coverage detected