Skip to content
Myr

📝 Update docs example for a Typer/Click group to make new subcommands explicit (#755)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sofie Van Landeghem · committed by GitHub · parent a0889ed · Browse files · 2 files+17 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+17 added−2 removed

  • tests:+8 added−0 removed
  • other:+9 added−2 removed

2 files+17 added−2 removed

modified:docs/tutorial/using-click.md+9 added-2 removed
modified:tests/test_tutorial/test_using_click/test_tutorial003.py+8 added
12 unmodified lines
13 # TODO: when deprecating Click 7, remove second option14 assert "Missing command" in result.stdout or "Usage" in result.stdout151617def test_help():18 result = runner.invoke(mod.typer_click_object, ["--help"])19 assert result.exit_code == 020 assert "Commands" in result.output21 assert "top" in result.output22 assert "hello" in result.output232425def test_typer():26 result = runner.invoke(mod.typer_click_object, ["top"])27 assert "The Typer app is at the top level" in result.stdout28
14 unmodified lines