| 735 | |
| 736 | @pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows") |
| 737 | def test_screen_update() -> None: |
| 738 | console = Console( |
| 739 | width=20, height=4, color_system="truecolor", force_terminal=True, _environ={} |
| 740 | ) |
| 741 | with console.capture() as capture: |
| 742 | with console.screen() as screen: |
| 743 | screen.update("foo", style="blue") |
| 744 | screen.update("bar") |
| 745 | screen.update() |
| 746 | result = capture.get() |
| 747 | print(repr(result)) |
| 748 | expected = "\x1b[?1049h\x1b[H\x1b[?25l\x1b[34mfoo\x1b[0m\x1b[34m \x1b[0m\n\x1b[34m \x1b[0m\n\x1b[34m \x1b[0m\n\x1b[34m \x1b[0m\x1b[34mbar\x1b[0m\x1b[34m \x1b[0m\n\x1b[34m \x1b[0m\n\x1b[34m \x1b[0m\n\x1b[34m \x1b[0m\x1b[34mbar\x1b[0m\x1b[34m \x1b[0m\n\x1b[34m \x1b[0m\n\x1b[34m \x1b[0m\n\x1b[34m \x1b[0m\x1b[?1049l\x1b[?25h" |
| 749 | assert result == expected |
| 750 | |
| 751 | |
| 752 | def test_height() -> None: |