Skip to content

Commit

Permalink
Use pytest.mark.asyncio (#707)
Browse files Browse the repository at this point in the history
* Use pytest.mark.asyncio

This resolved async test failures locally.

Refs #706
  • Loading branch information
markstory authored Feb 15, 2024
1 parent aba9741 commit d5e7402
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion responses/tests/test_registries.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def run_with_registry():
assert_reset()


async def test_registry_async():
@pytest.mark.asyncio
async def test_registry_async(): # type: ignore[misc]
class CustomRegistry(registries.FirstMatchRegistry):
pass

Expand Down
3 changes: 2 additions & 1 deletion responses/tests/test_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -2263,7 +2263,8 @@ def run():
assert_reset()


async def test_async_calls():
@pytest.mark.asyncio
async def test_async_calls(): # type: ignore[misc]
@responses.activate
async def run():
responses.add(
Expand Down

0 comments on commit d5e7402

Please sign in to comment.