MCPcopy
hub / github.com/pallets/click / test_exit_not_standalone

Function test_exit_not_standalone

tests/test_context.py:714–727  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

712
713
714def test_exit_not_standalone():
715 @click.command()
716 @click.pass_context
717 def cli(ctx):
718 ctx.exit(1)
719
720 assert cli.main([], "test_exit_not_standalone", standalone_mode=False) == 1
721
722 @click.command()
723 @click.pass_context
724 def cli(ctx):
725 ctx.exit(0)
726
727 assert cli.main([], "test_exit_not_standalone", standalone_mode=False) == 0
728
729
730@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

mainMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…