Skip to content

Commit

Permalink
skip alt screen if LW
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Mar 25, 2021
1 parent be5e9dc commit f1492a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,8 @@ def test_screen_update_class():

def test_is_alt_screen():
console = Console(force_terminal=True)
if console.legacy_windows:
return
assert not console.is_alt_screen
with console.screen():
assert console.is_alt_screen
Expand All @@ -617,6 +619,8 @@ def test_is_alt_screen():

def test_update_screen():
console = Console(force_terminal=True, width=20, height=5)
if console.legacy_windows:
return
with pytest.raises(errors.NoAltScreen):
console.update_screen("foo")
console.begin_capture()
Expand All @@ -631,6 +635,8 @@ def test_update_screen():

def test_update_screen_lines():
console = Console(force_terminal=True, width=20, height=5)
if console.legacy_windows:
return
with pytest.raises(errors.NoAltScreen):
console.update_screen_lines([])

Expand Down

0 comments on commit f1492a0

Please sign in to comment.