From acf71db8ca7756fe982e902248ce2afa3cc1be53 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 28 Sep 2019 17:06:18 -0700 Subject: [PATCH] Revert "Add fix for tmux 2.1" This reverts commit 0dace647f9e8e525062e735539e28be86ce2540e. --- tests/babi_test.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/tests/babi_test.py b/tests/babi_test.py index c7455fa..6521c6b 100644 --- a/tests/babi_test.py +++ b/tests/babi_test.py @@ -1,5 +1,4 @@ import contextlib -import functools import io import shlex import sys @@ -31,24 +30,10 @@ def test_get_lines(s, lines, nl, mixed): assert ret == (lines, nl, mixed) -@functools.lru_cache(maxsize=1) -def _tmux_height_off_by_one(): - with Runner(sys.executable, '-c', 'input(">")', height=24) as h: - h.await_text('>') - cmd = ('display', '-t0', '-p', '#{pane_height}') - height = int(h.tmux.execute_command(*cmd)) - h.press('Enter') - h.await_exit() - assert height in (23, 24) - return height == 23 - - class PrintsErrorRunner(Runner): - def __init__(self, *args, height=24, **kwargs): + def __init__(self, *args, **kwargs): self._screenshots: List[str] = [] - if _tmux_height_off_by_one(): # pragma: no cover (tmux 2.1) - height += 1 - super().__init__(*args, height=height, **kwargs) + super().__init__(*args, **kwargs) def screenshot(self, *args, **kwargs): ret = super().screenshot(*args, **kwargs)