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

loop_scope="package" raises a fixture not found error #1052

Open
NoahStapp opened this issue Jan 27, 2025 · 0 comments
Open

loop_scope="package" raises a fixture not found error #1052

NoahStapp opened this issue Jan 27, 2025 · 0 comments

Comments

@NoahStapp
Copy link

NoahStapp commented Jan 27, 2025

When using loop_scope="package", this fixture defined in my test/asynchronous/conftest.py throws a fatal error on test setup:

@pytest_asyncio.fixture(loop_scope="package", scope="package", autouse=True)
async def test_setup_and_teardown():
    await async_setup()
    yield
    await async_teardown()

# Error:
E       fixture 'test/asynchronous::<event_loop>' not found

Every other loop_scope does not throw this error. Is there an additional step required for package scoped fixtures?

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