Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest-bdd==3.2.0 breaks pytest-play (or any other non python pytest items) #317

Closed
davidemoro opened this issue Aug 20, 2019 · 3 comments · Fixed by #318
Closed

pytest-bdd==3.2.0 breaks pytest-play (or any other non python pytest items) #317

davidemoro opened this issue Aug 20, 2019 · 3 comments · Fixed by #318

Comments

@davidemoro
Copy link

Preconditions:

  • python environment with the following versions
  • pytest-bdd==3.2.0 and pytest-play installed in same python environment (no relevant pytest-play version, tested with 2.3.1 version for sake of completeness)

How to reproduce:

  • run pytest on a project with a pytest-play scenario

Expected result:

  • test run without errors

Actual result:

  • see error log
...
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pytest_bdd/plugin.py", line 104, in item_key
INTERNALERROR>     pytest_bdd_counter = getattr(item.function, '__pytest_bdd_counter__', 0)
INTERNALERROR> AttributeError: 'YAMLItem' object has no attribute 'function'

You can find all details and versions pinned here:

Is it possible to be compatible with non-python pytest items?

All fine with previous pytest-bdd version instead (3.1.1 is ok).

@davidemoro davidemoro changed the title pytest-bdd==3.2.0 breaks pytest-play (or any other non python approach) pytest-bdd==3.2.0 breaks pytest-play (or any other non python pytest items) Aug 20, 2019
@youtux
Copy link
Contributor

youtux commented Aug 20, 2019

Hi Davide, thanks for reporting this issue! I made a fix in #318, can you try that branch?

@davidemoro
Copy link
Author

Hi @youtux, it works fine using the fix-bug-with-non-function-items branch. Thanks!

@youtux
Copy link
Contributor

youtux commented Aug 21, 2019

I just pushed version 3.2.1 to PyPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants