From e992107ecff9a2f3f1282a87bdc8edfadcd01090 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sat, 15 Dec 2018 15:19:27 +0100 Subject: I give up on getting Link Mauve to ever run tests --- test/test_completion.py | 14 ++++++++++---- test/test_windows.py | 8 +++++--- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/test_completion.py b/test/test_completion.py index 4c5bc400..620b5658 100644 --- a/test/test_completion.py +++ b/test/test_completion.py @@ -15,13 +15,19 @@ config.config = ConfigShim() from poezio.windows import Input +class SubInput(Input): + def resize(self, *args, **kwargs): + pass + def rewrite_text(self, *args, **kwargs): + pass + def refresh(self, *args, **kwargs): + pass + + @pytest.fixture(scope="function") def input_obj(): - obj = Input() + obj = SubInput() obj.reset_completion() - obj.resize = lambda: None - obj.rewrite_text = lambda: None - obj.refresh = lambda: None return obj @pytest.fixture(scope="module") diff --git a/test/test_windows.py b/test/test_windows.py index cb7c86b7..af1b9d4a 100644 --- a/test/test_windows.py +++ b/test/test_windows.py @@ -9,11 +9,13 @@ config.config = ConfigShim() from poezio.windows import Input, HistoryInput, MessageInput +class SubInput(Input): + def rewrite_text(self, *args, **kwargs): + return None + @pytest.fixture def input(): - input = Input() - input.rewrite_text = lambda: None - return input + return SubInput() class TestInput(object): -- cgit v1.2.3