Skip to content

Commit d68032e

Browse files
committed
Try to fix last test that is failing on Windows
1 parent e16a59c commit d68032e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_history.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def verify_hi_last_result(app: cmd2.Cmd, expected_length: int) -> None:
3333
def test_pt_add_history_item() -> None:
3434
from prompt_toolkit import PromptSession
3535
from prompt_toolkit.history import InMemoryHistory
36+
from prompt_toolkit.input import DummyInput
37+
from prompt_toolkit.output import DummyOutput
3638

3739
# Create a history object and add some initial items
3840
history = InMemoryHistory()
@@ -42,7 +44,7 @@ def test_pt_add_history_item() -> None:
4244
assert len(history.get_strings()) == 2
4345

4446
# Start a session and use this history
45-
session = PromptSession(history=history)
47+
session = PromptSession(history=history, input=DummyInput(), output=DummyOutput())
4648

4749
session.history.get_strings().append('new command')
4850
assert 'new command' not in session.history.get_strings()

0 commit comments

Comments
 (0)