A command with a custom ``context_class`` should produce a context using that type.
()
| 2 | |
| 3 | |
| 4 | def test_command_context_class(): |
| 5 | """A command with a custom ``context_class`` should produce a |
| 6 | context using that type. |
| 7 | """ |
| 8 | |
| 9 | class CustomContext(click.Context): |
| 10 | pass |
| 11 | |
| 12 | class CustomCommand(click.Command): |
| 13 | context_class = CustomContext |
| 14 | |
| 15 | command = CustomCommand("test") |
| 16 | context = command.make_context("test", []) |
| 17 | assert isinstance(context, CustomContext) |
| 18 | |
| 19 | |
| 20 | def test_context_invoke_type(runner): |
nothing calls this directly
no test coverage detected
searching dependent graphs…