diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_completion.py | 14 | ||||
-rw-r--r-- | test/test_windows.py | 8 |
2 files changed, 15 insertions, 7 deletions
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): |