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 3.0 deprecates yield tests and produces warnings about it #164

Closed
cdent opened this issue Aug 19, 2016 · 3 comments
Closed

pytest 3.0 deprecates yield tests and produces warnings about it #164

cdent opened this issue Aug 19, 2016 · 3 comments

Comments

@cdent
Copy link
Owner

cdent commented Aug 19, 2016

gabbi generates tests for pytest with yields. with pytest 3.0 this is now deprecated and produces warnings:

WC1 /Users/cdent/src/gabbi/gabbi/tests/test_gabbits_pytest.py yield tests are deprecated

the advice is to use @pytest.mark.parametrize instead.

I investigated this a while ago and found it confusing when compared to the yield idea, but I guess now it is necessary.

@cdent
Copy link
Owner Author

cdent commented Aug 24, 2016

@jasonamyers are you wise in the ways of py.test generation?

@cdent
Copy link
Owner Author

cdent commented Sep 6, 2016

Based on what I've seen in the pytest docs the best solution, for the long term, is to not do yield tests at all nor build the tests, but instead use an entry point to have a plugin that collects the yaml files at test items. It's not clear how the fixtures would work in that set up.

😿

@cdent
Copy link
Owner Author

cdent commented Feb 2, 2017

Fixed by #187

@cdent cdent closed this as completed Feb 2, 2017
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

No branches or pull requests

1 participant