Commit Graph

281 Commits

Author SHA1 Message Date
Alessio Bogon 0cb89f451e better name, parametrizable stacklevel 2022-08-13 11:11:07 +02:00
Alessio Bogon d5112d8a87 Simplify test 2022-07-30 11:54:03 +02:00
Alessio Bogon 0be758e5ba Add unit test for step delegation 2022-07-30 11:49:25 +02:00
Alessio Bogon d149e3926c Test @step(...) 2022-07-30 11:30:10 +02:00
Alessio Bogon 62d6726eec add docstring 2022-07-30 11:24:25 +02:00
Alessio Bogon a16d246842 Add stacklevel param to the steps, implement a test that makes use of it 2022-07-29 16:23:31 +02:00
Alessio Bogon 63a4268b9c Fix bug when 2 steps have the same step name...
... but only one step impl was kept.
2022-07-27 17:02:35 +02:00
Alessio Bogon 49504d4935 Fix typo 2022-07-26 00:26:33 +02:00
Alessio Bogon 18c05bf92b Remove pytest<6 support logic 2022-07-26 00:20:31 +02:00
Alessio Bogon 020c443941 Stub fix for finding the right fixture for step definition 2022-07-24 00:02:52 +02:00
Alessio Bogon 2c8d1552e0 Add decoys to the test, hoping to catch many edge cases 2022-07-23 11:57:02 +02:00
Alessio Bogon a136cf04dc Remove unnecessary defaulting of the param 2022-07-23 10:55:38 +02:00
Alessio Bogon d73fa1edaf
Merge branch 'master' into anonymous-step-funcs 2022-07-15 18:38:38 +02:00
Alessio Bogon 18320bbefc `parsers.re` now does fullmatch.
This makes it work the same way other parsers work (they don't ignore non-matching characters at the end of the string)
2022-07-12 18:56:52 +02:00
Alessio Bogon 478e21bcdf Use `_` as step function name. It should not matter what the name is.
Inspired by the `ward` testing framework
2022-07-10 17:41:12 +02:00
Alessio Bogon f4a7bdfaf1 lazy_step_function -> step_function_marker and make it return None
And fix tests, remove useless ones.
2022-07-10 17:28:02 +02:00
Alessio Bogon 1a831b79b8 Add test 2022-07-10 17:14:12 +02:00
Alessio Bogon 345218dd67 Fix typo 2022-07-10 15:29:46 +02:00
Alessio Bogon a2a94adff1 Fix bug where normal steps would take precedence over other parsers. 2022-07-10 15:26:01 +02:00
Alessio Bogon 36bb1b9f32 Make sure step functions can be reused with converters 2022-07-10 14:20:30 +02:00
Alessio Bogon 81c1bef7aa Partially revert changes, just attach 1 parser to the lazy_step_func, and all the parsers to the actual function 2022-07-07 18:57:41 +02:00
Alessio Bogon 6e1566bb68 Removing clutter from the step_func 2022-07-07 16:30:25 +02:00
Alessio Bogon 15e1a8aa20 Handle multiple parsers connected to a step function 2022-07-06 18:09:29 +02:00
Alessio Bogon 384c02330d Fix test 2022-07-04 14:49:42 +02:00
Alessio Bogon e5f5b7c9cd Fix test 2022-07-04 14:29:01 +02:00
Alessio Bogon 5fad41f353 Only parse angular brackets in steps only for "Scenario Outline"s 2022-07-03 22:54:08 +02:00
Alessio Bogon 66750f169b
Merge branch 'master' into fix-typos 2022-03-05 16:49:25 +01:00
Alessio Bogon 01c52c9cf6
Merge branch 'master' into fix-typos 2022-03-03 13:57:10 +01:00
Alessio Bogon e378ccbc2c Fix runtime 2022-03-03 13:54:27 +01:00
Alessio Bogon 0bddeae70f Fix types 2022-03-03 13:49:05 +01:00
Alessio Bogon 4a4ad268fd Remove type annotations from tests 2022-03-03 13:47:02 +01:00
Alessio Bogon f2299c39f8 Simplify annotations 2022-03-03 13:43:01 +01:00
Alessio Bogon 9165dcc7a4 Remove dev junk 2022-03-03 13:41:56 +01:00
Alessio Bogon 3e49f3b6df Fix types 2022-02-24 16:53:27 +01:00
Alessio Bogon 644df2ee52 Use newer typing syntax 2022-02-24 16:00:36 +01:00
Alessio Bogon 021aa3a2e3 Use "from __future__ import annotations" to be less verbose 2022-02-24 15:32:20 +01:00
Alessio Bogon 4fd1ab950c Merge remote-tracking branch 'origin/master' into add-type-annotations
# Conflicts:
#	pytest_bdd/parser.py
#	pytest_bdd/scenario.py
2022-02-24 14:04:24 +01:00
Alessio Bogon 5bdeee606c Fix test name 2022-02-24 13:34:21 +01:00
Alessio Bogon d088c69640
Merge branch 'master' into unused-params-validation 2022-02-24 13:12:21 +01:00
Alessio Bogon 625eff1f5a
Merge branch 'master' into fix-typos 2022-02-24 13:10:53 +01:00
Alessio Bogon 68078ba446 Merge remote-tracking branch 'origin/master' into step-def-yield
# Conflicts:
#	CHANGES.rst
#	tox.ini
2022-02-24 12:41:23 +01:00
Alessio Bogon 8fe2e4ff3c Execute step definitions as if they were pytest fixture.
This way we can get the same behaviour of yield-fixtures.
2022-02-22 16:12:54 +01:00
Kian-Meng Ang 6ac08b8777 Fix typos 2022-02-14 20:55:04 +08:00
Oleg Pidsadnyi 496fabbd14 Scenario example validation restrictions removed. 2022-02-13 11:54:58 +01:00
Konstantin Goloveshko b05dbe0aec Update python environment
- Drop python 3.6 because of EOL
- Drop pytest<5 (Actually there wasn't reason to support 4.x version because they are about 3.4/2.7 python support, which already dropped)
- Fix source distribution build
2022-02-01 22:34:05 +02:00
Oleg Pidsadnyi 7cd7b40df3 Step arguments are no longer fixtures 2022-01-15 20:36:38 +01:00
Oleg Pidsadnyi 6730b428ed Removing the vertical examples support 2022-01-15 19:22:10 +01:00
Oleg Pidsadnyi e0a1437908 Feature examples removal. Compatibility with official gherkin 2022-01-15 19:07:11 +01:00
Kostiantyn Goloveshko f4ed62dcb4 Refuse combining of scenario outline and pytest parametrization
* Remove obsolete test
Discussed in #445, #448
2022-01-04 10:05:15 +01:00
pre-commit-ci[bot] 85733ce41f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-12-06 21:12:42 +00:00