()
| 573 | |
| 574 | |
| 575 | def test_save_text() -> None: |
| 576 | console = Console(record=True, width=100) |
| 577 | console.print("foo") |
| 578 | with tempfile.TemporaryDirectory() as path: |
| 579 | export_path = os.path.join(path, "rich.txt") |
| 580 | console.save_text(export_path) |
| 581 | with open(export_path, "rt") as text_file: |
| 582 | assert text_file.read() == "foo\n" |
| 583 | |
| 584 | |
| 585 | def test_save_html() -> None: |