GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Async fixture with `autouse=True` not executing properly in test · Issue #518 · pytest-dev/pytest-asyncio Closed as not planned Labels Description
Description: When using an asyncio fixture with pytest, the teardown fixture is not executing properly. The teardown fixture is meant to run after Steps to reproduce: # test_foo.py import pytest import asyncio @pytest.fixture(scope="function", autouse=True) @pytest.mark.asyncio async def teardown(): yield print("teardown") await asyncio.sleep(1) def test_foo(): assert True run Expected result: The teardown fixture should run after the test function, print "teardown", and await for one second before finishing. Actual result: If the yield statement is included, "teardown" does not get printed. Environment: Python version: 3.11.0 Pip list: Package Version attrs 22.2.0 Activity
MetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |