mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-21 05:28:31 +02:00
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:
parent
b6d1ecc0af
commit
d5d50c23c6
3 changed files with 13 additions and 2 deletions
|
@ -33,13 +33,12 @@ Feature: Basic reading and writing to a journal
|
||||||
When we run "jrnl -n 1"
|
When we run "jrnl -n 1"
|
||||||
Then the output should contain "2013-07-23 09:00 A cold and stormy day."
|
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
|
Scenario: Writing an empty entry from the editor
|
||||||
Given we use the config "editor.yaml"
|
Given we use the config "editor.yaml"
|
||||||
When we open the editor and enter nothing
|
When we open the editor and enter nothing
|
||||||
Then we should see the message "[Nothing saved to file]"
|
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
|
Scenario: Sending an argument with spaces to the editor should work
|
||||||
Given we use the config "editor-args.yaml"
|
Given we use the config "editor-args.yaml"
|
||||||
When we open the editor and enter "lorem ipsum"
|
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 "-f"
|
||||||
And one editor argument should be "-c"
|
And one editor argument should be "-c"
|
||||||
And one editor argument should match "'?setf markdown'?"
|
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
|
Scenario: Writing an empty entry from the command line
|
||||||
Given we use the config "basic.yaml"
|
Given we use the config "basic.yaml"
|
||||||
|
|
|
@ -94,6 +94,7 @@ def open_editor_and_enter(context, text=""):
|
||||||
return tmpfile
|
return tmpfile
|
||||||
|
|
||||||
with patch("subprocess.call", side_effect=_mock_editor_function):
|
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"')
|
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 nothing')
|
||||||
@when('we run "{command}" and enter "{inputs}"')
|
@when('we run "{command}" and enter "{inputs}"')
|
||||||
def run_with_input(context, command, 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
|
# 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()'
|
# to the mocked calls for 'input()', 'util.getpass()' and 'sys.stdin.read()'
|
||||||
if context.text:
|
if context.text:
|
||||||
|
@ -156,6 +159,7 @@ def run_with_input(context, command, inputs=""):
|
||||||
patch("sys.stdin.read", side_effect=text) as mock_read:
|
patch("sys.stdin.read", side_effect=text) as mock_read:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
print(f"cli.run {args}", file=sys.stderr)
|
||||||
cli.run(args or [])
|
cli.run(args or [])
|
||||||
context.exit_status = 0
|
context.exit_status = 0
|
||||||
except SystemExit as e:
|
except SystemExit as e:
|
||||||
|
|
|
@ -303,6 +303,8 @@ def configure_logger(debug=False):
|
||||||
|
|
||||||
|
|
||||||
def run(manual_args=None):
|
def run(manual_args=None):
|
||||||
|
print("run", file=sys.stderr)
|
||||||
|
|
||||||
if manual_args is None:
|
if manual_args is None:
|
||||||
manual_args = sys.argv[1:]
|
manual_args = sys.argv[1:]
|
||||||
|
|
||||||
|
@ -345,6 +347,9 @@ def run(manual_args=None):
|
||||||
|
|
||||||
mode_compose, mode_export, mode_import = guess_mode(args, config)
|
mode_compose, mode_export, mode_import = guess_mode(args, config)
|
||||||
|
|
||||||
|
print(f"mode_compose: {mode_compose}, mode_export: {mode_export}, mode_import: {mode_import}", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
# How to quit writing?
|
# How to quit writing?
|
||||||
if "win32" in sys.platform:
|
if "win32" in sys.platform:
|
||||||
_exit_multiline_code = "on a blank line, press Ctrl+Z and then Enter"
|
_exit_multiline_code = "on a blank line, press Ctrl+Z and then Enter"
|
||||||
|
@ -358,6 +363,8 @@ def run(manual_args=None):
|
||||||
print("[Interrupted while opening journal]", file=sys.stderr)
|
print("[Interrupted while opening journal]", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
print("journal is open", file=sys.stderr)
|
||||||
|
|
||||||
if mode_compose and not args.text:
|
if mode_compose and not args.text:
|
||||||
if not sys.stdin.isatty():
|
if not sys.stdin.isatty():
|
||||||
# Piping data into jrnl
|
# Piping data into jrnl
|
||||||
|
|
Loading…
Add table
Reference in a new issue