Refactor flow for easier access to some files (avoid things like jrnl.Journal.Journal and jrnl.jrnl co-existing) (#1662)

* run format

* rename cli.py to main.py

* rename jrnl.py to controller.py

* move journal class files into journals dir

* rename start -> run in controller.py
This commit is contained in:
Jonathan Wren 2023-01-14 14:42:29 -08:00 committed by GitHub
parent 7be67accc1
commit fff05eb646
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 84 additions and 69 deletions

View file

@ -8,7 +8,7 @@ from pytest_bdd import when
from pytest_bdd.parsers import parse
from pytest_bdd.parsers import re
from jrnl.cli import cli
from jrnl.main import run
@when(parse('we change directory to "{directory_name}"'))
@ -44,7 +44,7 @@ def we_run_jrnl(cli_run, capsys, keyring):
mocks[id] = stack.enter_context(factories[id]())
try:
cli_run["status"] = cli() or 0
cli_run["status"] = run() or 0
except StopIteration:
# This happens when input is expected, but don't have any input left
pass