Skip to content

Commit 8fbe0ea

Browse files
committed
fix: The message of the deprecation warning for decorating async fixtures with @pytest.fixture in strict mode now refers to the correct package name.
1 parent c382304 commit 8fbe0ea

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

changelog.d/1198.fixed.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Deprecation warning when decorating an asynchronous fixture with ``@pytest.fixture`` in `strict` mode. The warning message now refers to the correct package.

pytest_asyncio/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ def pytest_pyfunc_call(pyfuncitem: Function) -> object | None:
630630
"You might want to use @pytest_asyncio.fixture or switch "
631631
"to auto mode. "
632632
"This will become an error in future versions of "
633-
"flake8-asyncio."
633+
"pytest-asyncio."
634634
),
635635
stacklevel=1,
636636
)

tests/modes/test_strict_mode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ async def test_anything(any_fixture):
173173
"@pytest.fixture 'any_fixture' in strict mode. "
174174
"You might want to use @pytest_asyncio.fixture or switch to "
175175
"auto mode. "
176-
"This will become an error in future versions of flake8-asyncio."
176+
"This will become an error in future versions of pytest-asyncio."
177177
),
178178
],
179179
)
@@ -220,7 +220,7 @@ async def test_anything(any_fixture):
220220
"@pytest.fixture 'any_fixture' in strict mode. "
221221
"You might want to use @pytest_asyncio.fixture or switch to "
222222
"auto mode. "
223-
"This will become an error in future versions of flake8-asyncio."
223+
"This will become an error in future versions of pytest-asyncio."
224224
),
225225
],
226226
)

0 commit comments

Comments
 (0)