Commit Graph

1402 Commits

Author SHA1 Message Date
Alessio Bogon c45979c23a
Automatic feature files collection
This was generated with AI, fixed manually to make it work
2024-12-04 22:05:13 +01:00
Alessio Bogon 5e5c60f3b5
Remove usages of `Any` from `scenario.py` 2024-12-01 16:38:30 +01:00
Alessio Bogon ad221becd1
Fix typing in `reporting.py` and `cucumber_json.py`
I managed to remove all occurrences of `Any`, and use proper typed dicts instead
2024-12-01 16:35:11 +01:00
Alessio Bogon 4ccb683ecd
Merge remote-tracking branch 'origin/master' into ab/fix-typing
# Conflicts:
#	CHANGES.rst
#	src/pytest_bdd/parser.py
#	src/pytest_bdd/scenario.py
#	src/pytest_bdd/utils.py
2024-12-01 16:02:33 +01:00
jsa34 d527a6769b
Merge pull request #737 from yunxuo/master
fix: default value not covered by parameters passed through feature file
2024-12-01 10:50:56 +00:00
Alessio Bogon afec8b185d
Add back comment that was relevant 2024-12-01 11:02:33 +01:00
Alessio Bogon 5e10d3430f
Change function name so that it's clearer what it does 2024-12-01 11:00:31 +01:00
Alessio Bogon 9d99f0eceb
Remove irrelevant comment 2024-12-01 10:57:38 +01:00
Alessio Bogon 584b676c6d
Explain why we do things 2024-12-01 10:57:26 +01:00
Alessio Bogon a065d693b8
Merge remote-tracking branch 'origin/master' into fork/yunxuo/master 2024-12-01 10:56:29 +01:00
Alessio Bogon 4602314d03
Add test 2024-12-01 10:56:08 +01:00
Alessio Bogon 3752e405a3
Simplify implementation 2024-12-01 10:47:10 +01:00
Alessio Bogon bf7971a8cc
Make sure we test what the "given" step receives
Also, no need for this to use scenario outlines.
2024-12-01 10:43:39 +01:00
Alessio Bogon f5c3faa72a
Remove useless nested function 2024-12-01 09:38:45 +01:00
Alessio Bogon 39a948c2ef
Merge remote-tracking branch 'origin/master' into fork/yunxuo/master 2024-12-01 09:37:09 +01:00
jsa34 5d17d8c3ab
Merge pull request #748 from pytest-dev/raise-error-if-step-uses-reserved-arguments
Raise an error if a step defines reserved argument names (`datatable`, `docstring`)
2024-12-01 07:40:45 +00:00
Alessio Bogon c3a49c24a8
Fix return type 2024-11-30 23:59:40 +01:00
Alessio Bogon 0914837a03
Add changelog entry 2024-11-30 23:57:11 +01:00
Alessio Bogon 4eb54fdc7a
Raise an error if a step defines reserved argument names
This can cause headaches in the future, when users can't figure out why their step argument 'datatable' or 'docstring' does not get the value they expect
2024-11-30 23:54:06 +01:00
Alessio Bogon c70f526c60
Merge pull request #743 from pytest-dev/render-docstrings-and-datatables-with-example-params
Render docstrings and datatable cells with example table entries
2024-11-30 23:12:07 +01:00
Alessio Bogon 3f42ef3b31
Remove unused method 2024-11-30 23:08:26 +01:00
jsa34 f68c3f5ce6
Missed STEP_PARAM_RE -> PARAM_RE rename 2024-11-30 19:19:29 +00:00
jsa34 b2f101820f
Rename STEP_PARAM_RE to remove step referencs
The regex is no longer just for steps
2024-11-30 19:15:35 +00:00
Alessio Bogon 5a453c5dcb
Add changelog entry 2024-11-30 19:35:17 +01:00
Alessio Bogon e378567159
Merge branch 'master' into render-docstrings-and-datatables-with-example-params 2024-11-30 19:33:58 +01:00
Alessio Bogon 5b4e90e343
Avoid mutation of objects, return a new one 2024-11-30 19:29:42 +01:00
Alessio Bogon 67ab1f99fe
Inline methods that don't need to exist 2024-11-30 19:26:15 +01:00
Alessio Bogon be152c8b67
No need to use `Any`, we can use `object` 2024-11-30 19:23:40 +01:00
Alessio Bogon ce4e296a56
Fix content in readme 2024-11-30 19:22:12 +01:00
Alessio Bogon 023c6d66a7
Remove usages of `typing.Any` when possible 2024-11-30 19:11:56 +01:00
Alessio Bogon 49f363e06e
Improve type specificity 2024-11-30 18:26:20 +01:00
Alessio Bogon 6f3dd9db1d
`test_report_context` -> `test_report_context_registry`
This way we are consistent with the other registries
2024-11-30 18:22:56 +01:00
Alessio Bogon 02296c2644
Undo changes to `pyproject.toml` and `poetry.lock` 2024-11-30 18:20:05 +01:00
Alessio Bogon f52341c698
Fix changelog 2024-11-30 18:18:32 +01:00
Alessio Bogon 2cb6572999
Fix typing for `StepReport` args 2024-11-30 18:16:50 +01:00
Alessio Bogon 55db00545b
Fix typing for registry_get_safe 2024-11-30 18:14:47 +01:00
Alessio Bogon c1cd61f3d7
Merge branch 'master' into ab/fix-typing
# Conflicts:
#	poetry.lock
#	src/pytest_bdd/cucumber_json.py
#	src/pytest_bdd/feature.py
#	src/pytest_bdd/generation.py
#	src/pytest_bdd/gherkin_terminal_reporter.py
#	src/pytest_bdd/parser.py
#	src/pytest_bdd/reporting.py
#	src/pytest_bdd/scenario.py
#	src/pytest_bdd/steps.py
#	src/pytest_bdd/utils.py
#	tests/feature/test_description.py
2024-11-30 18:12:09 +01:00
Alessio Bogon 1e5595b37d
Add changelog entry 2024-11-30 17:28:24 +01:00
Alessio Bogon 766fabe59f
Merge pull request #746 from daara-s/fix-empty-usefixtures 2024-11-30 14:12:22 +01:00
Daara Shaw a4bf8431e3 ignore attr-defined of scenario_wrapper 2024-11-30 12:54:20 +00:00
Daara Shaw f95563461a Avoid pytest.mark.usefixtures call without arguments
This will raise a warning in an upcoming change in pytest
2024-11-30 09:59:05 +00:00
jsa34 c17348a170
Update README.rst
Co-authored-by: Vianney GREMMEL <loutre.a+github@gmail.com>
2024-11-28 16:27:41 +00:00
Jason Allen 1ff5df38c0 Apply the rendering to background steps, and test for these 2024-11-28 13:20:26 +00:00
Jason Allen e93097ecde Add example/documentation 2024-11-28 12:55:48 +00:00
Jason Allen e28ea98576 Make mypy happy 2024-11-28 12:25:59 +00:00
Jason Allen e0713d6a55 Render docstrings and datatable cells with example table entries, just like step names currently are. 2024-11-28 12:23:21 +00:00
jsa34 b4532577c7
Update scenario.py
Add type hints
2024-11-19 19:09:21 +01:00
pre-commit-ci[bot] 0224d68cc0 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-11-19 18:03:48 +00:00
jsa34 a9ce43f242
Update scenario.py
Add regression tested code to not break when Args not in the method signature are present
2024-11-19 19:03:38 +01:00
jsa34 7124f1a727
Merge branch 'master' into master 2024-11-15 10:18:10 +00:00