Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/reference/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changelog
0.25.0 (UNRELEASED)
===================
- Deprecated: Added warning when asyncio test requests async ``@pytest.fixture`` in strict mode. This will become an error in a future version of flake8-asyncio. `#979 <https://github.com/pytest-dev/pytest-asyncio/pull/979>`_
- Updates the error message about `pytest.mark.asyncio`'s `scope` keyword argument to say `loop_scope` instead. `#1004 <https://github.com/pytest-dev/pytest-asyncio/pull/1004>`_

0.24.0 (2024-08-22)
===================
Expand Down
2 changes: 1 addition & 1 deletion pytest_asyncio/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ def _get_marked_loop_scope(asyncio_marker: Mark) -> _ScopeName:
if asyncio_marker.args or (
asyncio_marker.kwargs and set(asyncio_marker.kwargs) - {"loop_scope", "scope"}
):
raise ValueError("mark.asyncio accepts only a keyword argument 'scope'.")
raise ValueError("mark.asyncio accepts only a keyword argument 'loop_scope'.")
if "scope" in asyncio_marker.kwargs:
if "loop_scope" in asyncio_marker.kwargs:
raise pytest.UsageError(_DUPLICATE_LOOP_SCOPE_DEFINITION_ERROR)
Expand Down
2 changes: 1 addition & 1 deletion tests/markers/test_invalid_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def test_anything():
result = pytester.runpytest_subprocess()
result.assert_outcomes(errors=1)
result.stdout.fnmatch_lines(
["*ValueError: mark.asyncio accepts only a keyword argument 'scope'*"]
["*ValueError: mark.asyncio accepts only a keyword argument 'loop_scope'*"]
)


Expand Down
Loading