pytest-dev / pytest-bdd

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

pytest-bdd does not check the type #17

Closed markon closed 11 years ago

markon commented 11 years ago

When you have a scenario like:

Scenario: Title
Given Xxx
When Yyy
Then Zzz

And a test file like:

@given("Yyy")
def myfunc(): 
  pass
#  other fixtures...

It passes silently. I would expect an error, because in a When statement I am referencing a Given statement.

bubenkoff commented 11 years ago

true, we don't have enough checks for types of fixtures created, please have a PR

On 11 September 2013 14:45, Marco Buccini notifications@github.com wrote:

When you have a scenario like:

Scenario: Title Given Xxx When Yyy Then Zzz

And a test file like:

@given("Yyy")def myfunc(): pass# other fixtures...

It passes silently. I would expect an error, because in a When statement I am referencing a Given statement.

— Reply to this email directly or view it on GitHubhttps://github.com/olegpidsadnyi/pytest-bdd/issues/17 .

Anatoly Bubenkov

olegpidsadnyi commented 11 years ago

Should be fixed in #22