Commit Graph

1462 Commits

Author SHA1 Message Date
Jason Allen 429205e5b5 Make test more focussed on the issue 2024-12-02 18:48:10 +00:00
Alessio Bogon be834076f3
Merge pull request #747 from pytest-dev/test-551
Empty example table entries with converter to None documentation
2024-12-01 23:17:13 +01:00
Jason Allen e181ced0b4 Remove unnecessary test 2024-12-01 21:03:13 +00:00
jsa34 781797c9dc
Make test purpose wording clearer 2024-12-01 17:11:12 +00:00
jsa34 c7189fd48f
Make clearer what the test is asserting 2024-12-01 17:07:15 +00: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 6c4391ac1a
Merge branch 'master' into test-177 2024-12-01 11:31:15 +00:00
Jason Allen f9728efbef Add to README how to make empty example cells return None, and add docstring to test 2024-12-01 11:30:04 +00:00
Jason Allen 9826dc7207 Merge branch 'master' into test-551 2024-12-01 10:54:19 +00: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 441c28b1ab
Merge branch 'master' into test-551 2024-12-01 07:49:11 +00: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
Jason Allen dd3266d522 Add test to make sure that converter for parser for empty strings in example tables works as expected
Resolves #551
2024-11-30 10:14:24 +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