Skip to content

setup_method not called for generative tests #28

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

Closed
pytestbot opened this issue Feb 25, 2011 · 2 comments
Closed

setup_method not called for generative tests #28

pytestbot opened this issue Feb 25, 2011 · 2 comments
Labels
type: bug problem that needs to be addressed

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Anonymous


I found that setup_method and teardown_method are not called for the tests generated by pytest_generate_tests(). Therefore I have to manually call them in each test method.


@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


fix issue 28 - setup_method now works with pytest_generate_tests

@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


This is fixed now, already installable from development PyPI:

pip install -i http://pypi.testrun.org -U pytest

(py.test --version should give 2.0.2.dev1 at least)

@pytestbot pytestbot added the type: bug problem that needs to be addressed label Jun 15, 2015
fkohlgrueber pushed a commit to fkohlgrueber/pytest that referenced this issue Oct 27, 2018
This happened when the last statement was a simple statement.

Fixes pytest-dev#18
Fixes pytest-dev#28
mgorny pushed a commit to mgorny/pytest that referenced this issue May 27, 2023
Removing six in favour of local copy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

1 participant