diff options
author | mathieui <mathieui@mathieui.net> | 2021-03-26 12:42:03 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-04-02 17:44:36 +0200 |
commit | ef772d8b2aaba697549b63173de9e0291691d11c (patch) | |
tree | 38b9aa63f667ad4bc784f26a4f2855daf2d39904 /test/test_windows.py | |
parent | 84afe4938dfa40aff388e48c1c0b159469656839 (diff) | |
download | poezio-ef772d8b2aaba697549b63173de9e0291691d11c.tar.gz poezio-ef772d8b2aaba697549b63173de9e0291691d11c.tar.bz2 poezio-ef772d8b2aaba697549b63173de9e0291691d11c.tar.xz poezio-ef772d8b2aaba697549b63173de9e0291691d11c.zip |
fix: failing tests
Diffstat (limited to 'test/test_windows.py')
-rw-r--r-- | test/test_windows.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/test/test_windows.py b/test/test_windows.py index af1b9d4a..3be96172 100644 --- a/test/test_windows.py +++ b/test/test_windows.py @@ -1,22 +1,32 @@ import pytest +from poezio.windows import Input, HistoryInput, MessageInput +from poezio import config + -class ConfigShim(object): +class ConfigShim: def get(self, *args, **kwargs): return '' -from poezio import config + def getbool(self, *args, **kwargs): + return True + + 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(): + from poezio.windows import base_wins + base_wins.TAB_WIN = True # The value is not relevant return SubInput() + class TestInput(object): def test_do_command(self, input): @@ -29,9 +39,9 @@ class TestInput(object): assert input.text == 'acoucou' def test_empty(self, input): - assert input.is_empty() == True + assert input.is_empty() input.do_command('a') - assert input.is_empty() == False + assert not input.is_empty() def test_key_left(self, input): for char in 'this is a line': |