From 7fbb5db5e71c14d47d94d966b681eb8b221f78df Mon Sep 17 00:00:00 2001 From: Aaron Lichtman Date: Mon, 18 Nov 2019 15:34:31 +0100 Subject: [PATCH] Fix no stdin input test --- features/core.feature | 3 +-- features/steps/core.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/features/core.feature b/features/core.feature index 50f40984..36601fde 100644 --- a/features/core.feature +++ b/features/core.feature @@ -28,8 +28,7 @@ Feature: Basic reading and writing to a journal Scenario: Writing an empty entry from the command line Given we use the config "basic.yaml" When we run "jrnl" and enter "" - Then we should get no error - And the output should be + Then the output should be """ """ diff --git a/features/steps/core.py b/features/steps/core.py index 0e4e2a75..af4d19a3 100644 --- a/features/steps/core.py +++ b/features/steps/core.py @@ -112,7 +112,7 @@ def run_with_input(context, command, inputs1="", inputs2=""): elif context.text: text = iter(context.text.split("\n")) else: - text = "" + text = iter(("", "")) args = ushlex(command)[1:] with patch("builtins.input", side_effect=_mock_input(text)) as mock_input: with patch("jrnl.util.getpass", side_effect=_mock_getpass(text)) as mock_getpass: