We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
master
When using async fixtures with scope='session', test hangs. Minimal example.
from asyncio import get_event_loop, sleep import pytest import faust app = faust.App('example') @app.agent() async def bar(stream): async for value in stream: yield value @pytest.fixture(scope='session') def event_loop(): loop = get_event_loop() yield loop @pytest.fixture(scope='session') async def session_ficture(): await sleep(0) yield 1 @pytest.fixture(scope='function') async def function_ficture(): await sleep(0) yield 2 async def test_good(function_ficture): async with bar.test_context() as agent: await agent.put('hey') async def test_hangs(session_ficture): async with bar.test_context() as agent: await agent.put('hey')
pytest.ini content: [pytest] asyncio_mode=auto
Tests should not be hanged.
Test 'test_hangs' is hanged.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Checklist
master
branch of Faust.Steps to reproduce
When using async fixtures with scope='session', test hangs.
Minimal example.
pytest.ini content:
[pytest]
asyncio_mode=auto
Expected behavior
Tests should not be hanged.
Actual behavior
Test 'test_hangs' is hanged.
Versions
The text was updated successfully, but these errors were encountered: