[Pytest-commit] Issue #565: autouse fixture and pytest_generate_tests not working together properly (hpk42/pytest)

Anthony Dodd issues-reply at bitbucket.org
Wed Aug 20 23:20:15 CEST 2014


New issue 565: autouse fixture and pytest_generate_tests not working together properly
https://bitbucket.org/hpk42/pytest/issue/565/autouse-fixture-and-pytest_generate_tests

Anthony Dodd:

I have a test harness ``class`` which has a ``@pytest.fixture(autouse)`` fixture. Inside of the harness ``class`` I've defined a ``pytest_generate_tests`` method hook which simply generates two tests for any test using a particular fixture. When I execute my test suite, the first test executes properly for each parametrized test, but the second always fails, seemingly due to the  ``@pytest.fixture(autouse)`` fixture not being executed.

Any thoughts. I can paste some additional code if need be.




More information about the pytest-commit mailing list