MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / test_argparse_with_no_args

Function test_argparse_with_no_args

tests/test_argparse.py:143–147  ·  view source on GitHub ↗

Make sure we receive TypeError when calling argparse-based function with no args

(argparse_app)

Source from the content-addressed store, hash-verified

141
142
143def test_argparse_with_no_args(argparse_app) -> None:
144 """Make sure we receive TypeError when calling argparse-based function with no args"""
145 with pytest.raises(TypeError) as excinfo:
146 argparse_app.do_say()
147 assert "Expected arguments" in str(excinfo.value)
148
149
150def test_argparser_kwargs(argparse_app, capsys) -> None:

Callers

nothing calls this directly

Calls 1

do_sayMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…