From 724be8194d92fd949328d75d76ee9b805397b4bc Mon Sep 17 00:00:00 2001 From: Michael Seifert Date: Thu, 3 Mar 2022 08:10:17 +0100 Subject: [PATCH] fix: Add positional arguments to the synchronous test function wrapper. This fixes a compatibility issue with Hypothesis 6.39.0. Closes #302 Signed-off-by: Michael Seifert --- README.rst | 1 + pytest_asyncio/plugin.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 402d84dc..d7c82615 100644 --- a/README.rst +++ b/README.rst @@ -260,6 +260,7 @@ Changelog 0.18.2 (Unreleased) ~~~~~~~~~~~~~~~~~~~ - Fix asyncio auto mode not marking static methods. `#295 `_ +- Fix a compatibility issue with Hypothesis 6.39.0. `#302 `_ 0.18.1 (22-02-10) diff --git a/pytest_asyncio/plugin.py b/pytest_asyncio/plugin.py index c31683ab..187f51da 100644 --- a/pytest_asyncio/plugin.py +++ b/pytest_asyncio/plugin.py @@ -432,8 +432,8 @@ def wrap_in_sync( func = raw_func @functools.wraps(func) - def inner(**kwargs): - coro = func(**kwargs) + def inner(*args, **kwargs): + coro = func(*args, **kwargs) if not inspect.isawaitable(coro): pyfuncitem.warn( pytest.PytestWarning(