pytest-dev / pytest-bdd

BDD library for the pytest runner
https://pytest-bdd.readthedocs.io/en/latest/
MIT License
1.32k stars 221 forks source link

question:Scenario Outline:how to parse out parameters #487

Closed zhaohaifei closed 2 years ago

zhaohaifei commented 2 years ago

I wrote a program as follows:

parse = functools.partial(parsers.parse)

Scenario Outline: Normal enable_audit parameter Given enable_audit is assigned an normal parameter:

Examples:
|  abc       |
|  1         |

@given(parse("enable_audit is assigned an normal parameter: {abc}")) def normal_enable_audit_param(abc): pass

Why can't the parser parse to 1, but parse it as ''?