Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pytest-bdd to v8.0 #1955

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mkdocs = ">=1.4"
parse-type = ">=0.6.0"
poethepoet = "*"
pytest = ">=6.2,<=8.1"
pytest-bdd = ">=6.0"
pytest-bdd = ">=8.0"
pytest-clarity = "*"
pytest-xdist = ">=2.5.0"
requests = "*"
Expand Down
26 changes: 23 additions & 3 deletions tests/bdd/features/actions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ Feature: Test combinations of edit, change-time, and delete
And we write nothing to the editor if opened
And we use the password "test" if prompted
When we run "jrnl --change-time '2022-04-23 10:30' --edit" and enter
"""
Y
N
Y
"""
Then the error output should contain "No text received from editor. Were you trying to delete all the entries?"
And the editor should have been called
When we run "jrnl -99 --short"
Then the output should be
"""
2020-08-31 14:32 A second entry in what I hope to be a long series.
2022-04-23 10:30 Entry the first.
2022-04-23 10:30 The third entry finally after weeks without writing.
"""

Examples: Configs
| config_file |
Expand All @@ -29,21 +33,27 @@ Feature: Test combinations of edit, change-time, and delete
Scenario Outline: --delete with --edit deletes selected entries
Given we use the config "<config_file>"
And we append to the editor if opened
"""
[2023-02-21 10:32] Here is a new entry
"""
And we use the password "test" if prompted
When we run "jrnl --delete --edit" and enter
"""
Y
N
Y
"""
Then the editor should have been called
And the error output should contain "3 entries found"
And the error output should contain "2 entries deleted"
And the error output should contain "1 entry added"
When we run "jrnl -99 --short"
Then the error output should contain "2 entries found"
And the output should be
"""
2020-08-31 14:32 A second entry in what I hope to be a long series.
2023-02-21 10:32 Here is a new entry
"""

Examples: Configs
| config_file |
Expand All @@ -57,19 +67,23 @@ Feature: Test combinations of edit, change-time, and delete
And we use the password "test" if prompted
# --change-time is asked first, then --delete
When we run "jrnl --change-time '2022-04-23 10:30' --delete" and enter
"""
N
N
Y
Y
N
N
"""
Then the error output should contain "3 entries found"
And the error output should contain "1 entry deleted"
And the error output should contain "1 entry modified"
When we run "jrnl -99 --short"
Then the output should be
"""
2020-08-31 14:32 A second entry in what I hope to be a long series.
2022-04-23 10:30 The third entry finally after weeks without writing.
"""

Examples: Configs
| config_file |
Expand All @@ -81,24 +95,30 @@ Feature: Test combinations of edit, change-time, and delete
Scenario Outline: Combining --change-time and --delete and --edit affects appropriate entries
Given we use the config "<config_file>"
And we append to the editor if opened
[2023-02-21 10:32] Here is a new entry
"""
[2023-02-21 10:32] Here is a new entry
"""
And we use the password "test" if prompted
# --change-time is asked first, then --delete, then --edit
When we run "jrnl --change-time '2022-04-23 10:30' --delete --edit" and enter
"""
N
Y
Y
Y
Y
N
"""
Then the error output should contain "3 entries found"
And the error output should contain "2 entries deleted"
And the error output should contain "1 entry modified" # only 1, because the other was deleted
And the error output should contain "1 entry added" # by edit
And the error output should contain "1 entry modified"
And the error output should contain "1 entry added"
When we run "jrnl -99 --short"
Then the output should be
"""
2022-04-23 10:30 The third entry finally after weeks without writing.
2023-02-21 10:32 Here is a new entry
"""

Examples: Configs
| config_file |
Expand Down
Loading