44 lines
1.3 KiB
Diff
44 lines
1.3 KiB
Diff
From d5e7402f1782692d04742562370abaca8d54a972 Mon Sep 17 00:00:00 2001
|
|
From: Mark Story <mark@mark-story.com>
|
|
Date: Thu, 15 Feb 2024 11:44:21 -0500
|
|
Subject: [PATCH] Use pytest.mark.asyncio (#707)
|
|
|
|
* Use pytest.mark.asyncio
|
|
|
|
This resolved async test failures locally.
|
|
|
|
Refs #706
|
|
---
|
|
responses/tests/test_registries.py | 3 ++-
|
|
responses/tests/test_responses.py | 3 ++-
|
|
2 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/responses/tests/test_registries.py b/responses/tests/test_registries.py
|
|
index 2ab035b1..c2c90d97 100644
|
|
--- a/responses/tests/test_registries.py
|
|
+++ b/responses/tests/test_registries.py
|
|
@@ -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
|
|
|
|
diff --git a/responses/tests/test_responses.py b/responses/tests/test_responses.py
|
|
index e074f6a9..12176b92 100644
|
|
--- a/responses/tests/test_responses.py
|
|
+++ b/responses/tests/test_responses.py
|
|
@@ -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(
|