Remove skip_win directives, cause them to fail, and add tracers to see where it hangs in the Travis build log

This commit is contained in:
Micah Jerome Ellison 2020-05-24 13:27:33 -07:00
parent b6d1ecc0af
commit d5d50c23c6
3 changed files with 13 additions and 2 deletions

View file

@ -33,13 +33,12 @@ Feature: Basic reading and writing to a journal
When we run "jrnl -n 1"
Then the output should contain "2013-07-23 09:00 A cold and stormy day."
@skip_win
Scenario: Writing an empty entry from the editor
Given we use the config "editor.yaml"
When we open the editor and enter nothing
Then we should see the message "[Nothing saved to file]"
Then we should see the message "This test was hanging on Travis"
@skip_win
Scenario: Sending an argument with spaces to the editor should work
Given we use the config "editor-args.yaml"
When we open the editor and enter "lorem ipsum"
@ -48,6 +47,7 @@ Feature: Basic reading and writing to a journal
And one editor argument should be "-f"
And one editor argument should be "-c"
And one editor argument should match "'?setf markdown'?"
Then we should see the message "This test was hanging on Travis"
Scenario: Writing an empty entry from the command line
Given we use the config "basic.yaml"

View file

@ -94,6 +94,7 @@ def open_editor_and_enter(context, text=""):
return tmpfile
with patch("subprocess.call", side_effect=_mock_editor_function):
print("About to run execute_steps", file=sys.stderr)
context.execute_steps('when we run "jrnl"')
@ -140,6 +141,8 @@ def _mock_input(inputs):
@when('we run "{command}" and enter nothing')
@when('we run "{command}" and enter "{inputs}"')
def run_with_input(context, command, inputs=""):
print("run_with_input", file=sys.stderr)
# create an iterator through all inputs. These inputs will be fed one by one
# to the mocked calls for 'input()', 'util.getpass()' and 'sys.stdin.read()'
if context.text:
@ -156,6 +159,7 @@ def run_with_input(context, command, inputs=""):
patch("sys.stdin.read", side_effect=text) as mock_read:
try:
print(f"cli.run {args}", file=sys.stderr)
cli.run(args or [])
context.exit_status = 0
except SystemExit as e: