(app)
| 351 | |
| 352 | |
| 353 | def test_cli_custom_obj(app): |
| 354 | class NS: |
| 355 | called = False |
| 356 | |
| 357 | def create_app(): |
| 358 | NS.called = True |
| 359 | return app |
| 360 | |
| 361 | @app.cli.command("hello") |
| 362 | def hello_command(): |
| 363 | click.echo("Hello, World!") |
| 364 | |
| 365 | script_info = ScriptInfo(create_app=create_app) |
| 366 | runner = app.test_cli_runner() |
| 367 | runner.invoke(hello_command, obj=script_info) |
| 368 | assert NS.called |
| 369 | |
| 370 | |
| 371 | def test_client_pop_all_preserved(app, req_ctx, client): |
nothing calls this directly
no test coverage detected
searching dependent graphs…