Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
klen committed Aug 18, 2023
1 parent aa26dd3 commit 72888d6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions muffin/pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ async def app(pytestconfig, request, aiolib): # noqa: ARG001
"""Load an application, run lifespan events, prepare plugins."""
if not pytestconfig.app:
logging.warning(
(
"Improperly configured. Please set ``muffin_app`` in your pytest config. "
"Or use ``--muffin-app`` command option."
),
"Improperly configured. Please set ``muffin_app`` in your pytest config. "
"Or use ``--muffin-app`` command option.",
)
return

Expand Down Expand Up @@ -83,11 +81,12 @@ async def lifecycle(app: Application):
]

# Manage lifespan and prepare plugins
async with AsyncExitStack() as stack, manage_lifespan(app):
async with AsyncExitStack() as stack:
for conftest in plugin_conf:
await stack.enter_async_context(conftest())

yield app
async with manage_lifespan(app):
yield app


@pytest.fixture()
Expand Down

0 comments on commit 72888d6

Please sign in to comment.