(capsys)
| 16 | |
| 17 | |
| 18 | def 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 | |
| 36 | async def test_styling(monkeypatch) -> None: |