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

Function test_pexcept_style

tests/test_cmd2.py:3236–3242  ·  view source on GitHub ↗
(base_app, capsys)

Source from the content-addressed store, hash-verified

3234
3235@with_ansi_style(ru.AllowStyle.ALWAYS)
3236def test_pexcept_style(base_app, capsys) -> None:
3237 msg = Exception("testing...")
3238
3239 base_app.pexcept(msg)
3240 _out, err = capsys.readouterr()
3241 expected = su.stylize("Exception: ", style="traceback.exc_type")
3242 assert err.startswith(expected)
3243
3244
3245@with_ansi_style(ru.AllowStyle.NEVER)

Callers

nothing calls this directly

Calls 1

pexceptMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…