()
| 426 | |
| 427 | |
| 428 | def 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 | |
| 446 | class TestRoutes: |
nothing calls this directly
no test coverage detected