(app)
| 362 | |
| 363 | |
| 364 | def test_cli_custom_obj(app): |
| 365 | class NS: |
| 366 | called = False |
| 367 | |
| 368 | def create_app(): |
| 369 | NS.called = True |
| 370 | return app |
| 371 | |
| 372 | @app.cli.command("hello") |
| 373 | def hello_command(): |
| 374 | click.echo("Hello, World!") |
| 375 | |
| 376 | script_info = ScriptInfo(create_app=create_app) |
| 377 | runner = app.test_cli_runner() |
| 378 | runner.invoke(hello_command, obj=script_info) |
| 379 | assert NS.called |
| 380 | |
| 381 | |
| 382 | def test_client_pop_all_preserved(app, req_ctx, client): |
nothing calls this directly
no test coverage detected