()
| 277 | |
| 278 | |
| 279 | def test_log() -> None: |
| 280 | console = Console( |
| 281 | file=io.StringIO(), |
| 282 | width=80, |
| 283 | color_system="truecolor", |
| 284 | log_time_format="TIME", |
| 285 | log_path=False, |
| 286 | _environ={}, |
| 287 | ) |
| 288 | console.log("foo", style="red") |
| 289 | expected = "\x1b[2;36mTIME\x1b[0m\x1b[2;36m \x1b[0m\x1b[31mfoo \x1b[0m\n" |
| 290 | result = console.file.getvalue() |
| 291 | print(repr(result)) |
| 292 | assert result == expected |
| 293 | |
| 294 | |
| 295 | def test_log_milliseconds() -> None: |