diff --git a/features/format.feature b/features/format.feature index f5156301..7fd82718 100644 --- a/features/format.feature +++ b/features/format.feature @@ -396,7 +396,6 @@ Feature: Custom formats | basic_folder | | basic_dayone | - @skip_win Scenario Outline: Export to yaml Given we use the config ".yaml" And we use the password "test" if prompted diff --git a/jrnl/os_compat.py b/jrnl/os_compat.py index 2da13515..6615b886 100644 --- a/jrnl/os_compat.py +++ b/jrnl/os_compat.py @@ -15,4 +15,4 @@ def on_posix(): def split_args(args): """Split arguments and add escape characters as appropriate for the OS""" - return shlex.split(args, posix=on_posix) + return shlex.split(args, posix=on_posix()) diff --git a/tests/test_os_compat.py b/tests/test_os_compat.py index 9b31de50..008dbcef 100644 --- a/tests/test_os_compat.py +++ b/tests/test_os_compat.py @@ -67,7 +67,7 @@ def test_on_posix(systems): ) def test_split_args_on_windows(args): input_arguments, expected_split_args = args[0], args[1] - with mock.patch("jrnl.os_compat.on_windows", True): + with mock.patch("jrnl.os_compat.on_windows", lambda: True): assert split_args(input_arguments) == expected_split_args @@ -83,5 +83,5 @@ def test_split_args_on_windows(args): ) def test_split_args_on_not_windows(args): input_arguments, expected_split_args = args[0], args[1] - with mock.patch("jrnl.os_compat.on_windows", True): + with mock.patch("jrnl.os_compat.on_windows", lambda: True): assert split_args(input_arguments) == expected_split_args