* Encapsulate all multiline strings in triple-quotes in Gherkin files
Since pytest-bdd v8.0.0 uses the official Gherkin parser, multiline
strings must now be encapsulated by triple-quotes.
See:
- https://pytest-bdd.readthedocs.io/en/stable/#id2
- https://pytest-bdd.readthedocs.io/en/stable/#docstrings
* Remove comments in Gherkin files causing test breakage
These comments break the step matching.
* Fix compatibility of step-functions matching on multiple lines
In pytest-bdd v8.0.0 it is no longer possible to match based on multiple
lines, which breaks essentially all steps that support docstrings. Solve
this by adding a wrapper-function for each of these instances, that
matches the docstring step, and calls the original function.
So, what used to be:
@then(parse("the output should match\n{regex}"))
@then(parse('the output should match "{regex}"'))
def output_should_match(regex, cli_run):
...
Is now:
@then(parse("the output should match"))
def output_should_match_docstring(cli_run, docstring):
output_should_match(docstring, cli_run)
@then(parse('the output should match "{regex}"'))
def output_should_match(regex, cli_run):
...
There is possibly a way around this that is much better than what I've
done here, but this is a start at least.
* Update version requirement of pytest-bdd to >=8.0
* Update tox config to match poetry config
---------
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
* Add prompt to ask user if entries should be formatted with colors when installing jrnl
* Use magenta instead of black for default date color
* Use other default colors and alphabetize color list
* Update tests
* Delete test file
* update lock file
* fix failing test after merge conflict
---------
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
* Suppress "Entry added to default journal" message if using default journal
* Replace "Entry added" BDD test steps with "we should get no error" now that the message is suppressed
* Add positive and negative tests for "Entry added" message behavior
* update copyright symbols to unicode
* clean up version screen/copyright notice
* small change to make commands more similar
* update imports to appease isort
* fix test
* update one more file merged since PR was open
* Check config if FolderJournal and treat as so
* Add test for end of path is slash
* Code format correction
* Requested changes PR 1482
* Add info to doc about path of folder.
* Small addition to doc about folder journal
* WIP
* fix handling of user input (stdin, input, getpass)
* take out redundant pytest step
* fix handling of 'we should' statements
* fix test that doesn't use a config file
* fix another test that uses stdin
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
* remove .tool-versions file per PR feedback
* add comment to clarify why disembodied variables are here
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>