()
| 293 | |
| 294 | |
| 295 | def test_log_milliseconds() -> None: |
| 296 | def time_formatter(timestamp: datetime) -> Text: |
| 297 | return Text("TIME") |
| 298 | |
| 299 | console = Console( |
| 300 | file=io.StringIO(), width=40, log_time_format=time_formatter, log_path=False |
| 301 | ) |
| 302 | console.log("foo") |
| 303 | result = console.file.getvalue() |
| 304 | assert result == "TIME foo \n" |
| 305 | |
| 306 | |
| 307 | def test_print_empty() -> None: |