| 721 | |
| 722 | @pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows") |
| 723 | def test_screen() -> None: |
| 724 | console = Console( |
| 725 | color_system=None, force_terminal=True, force_interactive=True, _environ={} |
| 726 | ) |
| 727 | with console.capture() as capture: |
| 728 | with console.screen(): |
| 729 | console.print("Don't panic") |
| 730 | expected = "\x1b[?1049h\x1b[H\x1b[?25lDon't panic\n\x1b[?1049l\x1b[?25h" |
| 731 | result = capture.get() |
| 732 | print(repr(result)) |
| 733 | assert result == expected |
| 734 | |
| 735 | |
| 736 | @pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows") |