(runner)
| 664 | |
| 665 | |
| 666 | def test_dynamic_default_help_special_method(runner): |
| 667 | class Value: |
| 668 | def __call__(self): |
| 669 | return 42 |
| 670 | |
| 671 | def __str__(self): |
| 672 | return "special value" |
| 673 | |
| 674 | opt = click.Option(["-a"], default=Value(), show_default=True) |
| 675 | ctx = click.Context(click.Command("cli")) |
| 676 | assert opt.get_help_extra(ctx) == {"default": "special value"} |
| 677 | assert "special value" in opt.get_help_record(ctx)[1] |
| 678 | |
| 679 | |
| 680 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected