MCPcopy Create free account
hub / github.com/ipython/traitlets / check_help_all_output

Function check_help_all_output

traitlets/tests/utils.py:32–43  ·  view source on GitHub ↗

test that `python -m PKG --help-all` works

(pkg: str, subcommand: Sequence[str] | None = None)

Source from the content-addressed store, hash-verified

30
31
32def check_help_all_output(pkg: str, subcommand: Sequence[str] | None = None) -> tuple[str, str]:
33 """test that `python -m PKG --help-all` works"""
34 cmd = [sys.executable, "-m", pkg]
35 if subcommand:
36 cmd.extend(subcommand)
37 cmd.append("--help-all")
38 out, err, rc = get_output_error_code(cmd)
39 assert rc == 0, err
40 assert "Traceback" not in err
41 assert "Options" in out
42 assert "Class options" in out
43 return out, err

Callers 1

test_help_all_outputFunction · 0.90

Calls 3

get_output_error_codeFunction · 0.85
extendMethod · 0.80
appendMethod · 0.80

Tested by 1

test_help_all_outputFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…