Implement editor-related steps in pytest-bdd

- Implement mock editor fixture
- Add fixture to keep track of editor state
- Implement various steps to check editor state

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
Jonathan Wren 2021-04-24 14:47:52 -07:00
parent ce64d7973b
commit 3ddfb4d594
6 changed files with 475 additions and 133 deletions

View file

@ -26,7 +26,7 @@ def get_text_from_editor(config, template=""):
try:
subprocess.call(split_args(config["editor"]) + [tmpfile])
except Exception as e:
except FileNotFoundError as e:
error_msg = f"""
{ERROR_COLOR}{str(e)}{RESET_COLOR}