(monkeypatch)
| 34 | |
| 35 | |
| 36 | async def test_styling(monkeypatch) -> None: |
| 37 | monkeypatch.setattr(vt_codes, "ensure_supported", lambda _: True) |
| 38 | |
| 39 | f = io.StringIO() |
| 40 | t = termlog.TermLog(out=f) |
| 41 | with taddons.context(t) as tctx: |
| 42 | tctx.configure(t) |
| 43 | logging.warning("hello") |
| 44 | |
| 45 | assert "\x1b[33mhello\x1b[0m" in f.getvalue() |
| 46 | t.uninstall() |
| 47 | |
| 48 | |
| 49 | async def test_cannot_print(monkeypatch) -> None: |