summaryrefslogtreecommitdiff
path: root/test/test_windows.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_windows.py')
-rw-r--r--test/test_windows.py20
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':