()
| 561 | |
| 562 | |
| 563 | def test_save_svg() -> None: |
| 564 | console = Console(record=True, width=100) |
| 565 | console.print( |
| 566 | "[b red on blue reverse]foo[/] [blink][link=https://example.org]Click[/link]" |
| 567 | ) |
| 568 | with tempfile.TemporaryDirectory() as path: |
| 569 | export_path = os.path.join(path, "example.svg") |
| 570 | console.save_svg(export_path) |
| 571 | with open(export_path, "rt", encoding="utf-8") as svg_file: |
| 572 | assert svg_file.read() == EXPECTED_SVG |
| 573 | |
| 574 | |
| 575 | def test_save_text() -> None: |