MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_output

Function test_output

test/mitmproxy/addons/test_termlog.py:18–33  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

16
17
18def test_output(capsys):
19 logging.getLogger().setLevel(logging.DEBUG)
20 t = termlog.TermLog()
21 with taddons.context(t) as tctx:
22 tctx.options.termlog_verbosity = "info"
23 tctx.configure(t)
24 logging.info("one")
25 logging.debug("two")
26 logging.warning("three")
27 logging.error("four")
28 out, err = capsys.readouterr()
29 assert "one" in out
30 assert "two" not in out
31 assert "three" in out
32 assert "four" in out
33 t.uninstall()
34
35
36async def test_styling(monkeypatch) -> None:

Callers

nothing calls this directly

Calls 6

uninstallMethod · 0.95
contextMethod · 0.80
infoMethod · 0.80
configureMethod · 0.45
debugMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…