Add more steps to pytest, fully remove behave (#1347)

* update yaml loader to new method

* Add config overrides steps to pytest

This requires some patching around the config object, which now happens
in every test.

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>

* udpate docs for new tests

* remove behave from deps

* remove feature dir from flake8 checks

* udpate lock file

* disable pip version check (it keeps spamming the pipeline)

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
Jonathan Wren 2021-10-09 12:10:08 -07:00 committed by GitHub
parent a98f3f78af
commit 44edb9bdee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
112 changed files with 264 additions and 4814 deletions

View file

@ -34,6 +34,7 @@ def when_we_change_directory(directory_name):
def we_run(
command,
config_path,
config_in_memory,
user_input,
cli_run,
capsys,
@ -63,7 +64,19 @@ def we_run(
password = user_input
with ExitStack() as stack:
# Always mock
from jrnl.override import apply_overrides
def my_overrides(*args, **kwargs):
result = apply_overrides(*args, **kwargs)
config_in_memory["overrides"] = result
return result
stack.enter_context(
patch("jrnl.jrnl.apply_overrides", side_effect=my_overrides)
)
# Conditionally mock
stack.enter_context(patch("sys.argv", ["jrnl"] + args))
mock_stdin = stack.enter_context(