troubleshooting windows test failures on travis

This commit is contained in:
Jonathan Wren 2020-10-17 13:31:50 -07:00
parent 4702e6c772
commit 6df0db1832
No known key found for this signature in database
GPG key ID: 43D5FF8722E7F68A
2 changed files with 12 additions and 8 deletions

View file

@ -83,6 +83,10 @@ class FailedKeyring(keyring.backend.KeyringBackend):
self.keys[servicename][username] = None self.keys[servicename][username] = None
# set a default keyring
keyring.set_keyring(TestKeyring())
def ushlex(command): def ushlex(command):
return shlex.split(command, posix=not on_windows) return shlex.split(command, posix=not on_windows)
@ -458,7 +462,7 @@ def check_output_inline(context, text=None, text2=None):
def check_error_output_inline(context, text=None, text2=None): def check_error_output_inline(context, text=None, text2=None):
text = text or context.text text = text or context.text
out = context.stderr_capture.getvalue() out = context.stderr_capture.getvalue()
assert text in out or text2 in out, text or text2 assert (text and text in out) or (text2 and text2 in out)
@then('the output should match "{regex}"') @then('the output should match "{regex}"')

View file

@ -16,17 +16,17 @@ Feature: Writing new entries.
Scenario Outline: Single line entry with period should be split at period Scenario Outline: Single line entry with period should be split at period
Given we use the config "<config_file>.yaml" Given we use the config "<config_file>.yaml"
And we use the password "bad doggie no biscuit" if prompted And we use the password "test" if prompted
When we run "jrnl This is. the title" When we run "jrnl This is. the title"
And we run "jrnl -n 1" And we run "jrnl -1"
Then the output should contain "| the title" Then the output should contain "| the title"
Examples: configs Examples: configs
| config_file | | config_file |
| simple | | basic_onefile |
| empty_folder | | basic_encrypted |
| dayone | | basic_folder |
| encrypted | | basic_dayone |
Scenario Outline: Writing an entry from command line should store the entry Scenario Outline: Writing an entry from command line should store the entry
Given we use the config "<config_file>.yaml" Given we use the config "<config_file>.yaml"