- Add patch use-asyncio-markers.patch:
* Use asyncio markers for pytest. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-responses?expand=0&rev=67
This commit is contained in:
parent
16ef75752a
commit
ca9750c0f3
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 7 07:29:01 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch use-asyncio-markers.patch:
|
||||||
|
* Use asyncio markers for pytest.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 14 08:19:57 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
Thu Mar 14 08:19:57 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ Summary: A utility library for mocking out the `requests` Python library
|
|||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/getsentry/responses
|
URL: https://github.com/getsentry/responses
|
||||||
Source: https://files.pythonhosted.org/packages/source/r/responses/responses-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/r/responses/responses-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM gh#getsentry/responses#707
|
||||||
|
Patch0: use-asyncio-markers.patch
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
|
74
use-asyncio-markers.patch
Normal file
74
use-asyncio-markers.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
From 685d75afa091a5e1eaf7a2b008f6edf46a03301d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mark Story <mark@mark-story.com>
|
||||||
|
Date: Wed, 14 Feb 2024 15:15:05 -0500
|
||||||
|
Subject: [PATCH 1/2] Use pytest.mark.asyncio
|
||||||
|
|
||||||
|
This resolved async test failures locally.
|
||||||
|
|
||||||
|
Refs #706
|
||||||
|
---
|
||||||
|
responses/tests/test_registries.py | 1 +
|
||||||
|
responses/tests/test_responses.py | 1 +
|
||||||
|
2 files changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/responses/tests/test_registries.py b/responses/tests/test_registries.py
|
||||||
|
index 2ab035b1..97fd07fb 100644
|
||||||
|
--- a/responses/tests/test_registries.py
|
||||||
|
+++ b/responses/tests/test_registries.py
|
||||||
|
@@ -63,6 +63,7 @@ def run_with_registry():
|
||||||
|
assert_reset()
|
||||||
|
|
||||||
|
|
||||||
|
+@pytest.mark.asyncio
|
||||||
|
async def test_registry_async():
|
||||||
|
class CustomRegistry(registries.FirstMatchRegistry):
|
||||||
|
pass
|
||||||
|
diff --git a/responses/tests/test_responses.py b/responses/tests/test_responses.py
|
||||||
|
index e074f6a9..98537fe9 100644
|
||||||
|
--- a/responses/tests/test_responses.py
|
||||||
|
+++ b/responses/tests/test_responses.py
|
||||||
|
@@ -2263,6 +2263,7 @@ def run():
|
||||||
|
assert_reset()
|
||||||
|
|
||||||
|
|
||||||
|
+@pytest.mark.asyncio
|
||||||
|
async def test_async_calls():
|
||||||
|
@responses.activate
|
||||||
|
async def run():
|
||||||
|
|
||||||
|
From 790646dd1df11ff7c51655c2a6193000d888e66d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mark Story <mark@mark-story.com>
|
||||||
|
Date: Wed, 14 Feb 2024 16:16:00 -0500
|
||||||
|
Subject: [PATCH 2/2] Add type ignores
|
||||||
|
|
||||||
|
---
|
||||||
|
responses/tests/test_registries.py | 2 +-
|
||||||
|
responses/tests/test_responses.py | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/responses/tests/test_registries.py b/responses/tests/test_registries.py
|
||||||
|
index 97fd07fb..c2c90d97 100644
|
||||||
|
--- a/responses/tests/test_registries.py
|
||||||
|
+++ b/responses/tests/test_registries.py
|
||||||
|
@@ -64,7 +64,7 @@ def run_with_registry():
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
-async def test_registry_async():
|
||||||
|
+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 98537fe9..12176b92 100644
|
||||||
|
--- a/responses/tests/test_responses.py
|
||||||
|
+++ b/responses/tests/test_responses.py
|
||||||
|
@@ -2264,7 +2264,7 @@ def run():
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
-async def test_async_calls():
|
||||||
|
+async def test_async_calls(): # type: ignore[misc]
|
||||||
|
@responses.activate
|
||||||
|
async def run():
|
||||||
|
responses.add(
|
Loading…
Reference in New Issue
Block a user