forked from pool/python-pytest-subprocess
- Refresh patch py314-fix-tests.patch
* Ignore DeprecationWarning about asyncio event loop policies.
This commit is contained in:
@@ -8,16 +8,16 @@ This is basically a followup of https://github.com/aklajnert/pytest-subprocess/p
|
||||
tests/test_examples.py | 28 ++++++++++++++++------------
|
||||
1 file changed, 16 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/tests/test_examples.py b/tests/test_examples.py
|
||||
index 5a27604..df849f3 100644
|
||||
--- a/tests/test_examples.py
|
||||
+++ b/tests/test_examples.py
|
||||
Index: pytest-subprocess-1.5.3/tests/test_examples.py
|
||||
===================================================================
|
||||
--- pytest-subprocess-1.5.3.orig/tests/test_examples.py
|
||||
+++ pytest-subprocess-1.5.3/tests/test_examples.py
|
||||
@@ -1,3 +1,4 @@
|
||||
+import sys
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
@@ -39,18 +40,21 @@ def test_documentation(testdir, rst_file):
|
||||
@@ -39,18 +40,21 @@ def test_documentation(testdir, rst_file
|
||||
" os.chdir(os.path.dirname(__file__))\n\n"
|
||||
)
|
||||
|
||||
@@ -51,3 +51,36 @@ index 5a27604..df849f3 100644
|
||||
|
||||
code_blocks = "\n".join(get_code_blocks(ROOT_DIR / rst_file))
|
||||
testdir.makepyfile(
|
||||
Index: pytest-subprocess-1.5.3/tests/test_asyncio.py
|
||||
===================================================================
|
||||
--- pytest-subprocess-1.5.3.orig/tests/test_asyncio.py
|
||||
+++ pytest-subprocess-1.5.3/tests/test_asyncio.py
|
||||
@@ -2,6 +2,7 @@ import asyncio
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
+import warnings
|
||||
|
||||
import anyio
|
||||
import pytest
|
||||
@@ -13,12 +14,14 @@ PYTHON = sys.executable
|
||||
|
||||
@pytest.fixture()
|
||||
def event_loop_policy(request):
|
||||
- if sys.platform.startswith("win"):
|
||||
- if request.node.name.startswith("test_invalid_event_loop"):
|
||||
- return asyncio.WindowsSelectorEventLoopPolicy()
|
||||
- else:
|
||||
- return asyncio.WindowsProactorEventLoopPolicy()
|
||||
- return asyncio.DefaultEventLoopPolicy()
|
||||
+ with warnings.catch_warnings():
|
||||
+ warnings.simplefilter('ignore', DeprecationWarning)
|
||||
+ if sys.platform.startswith("win"):
|
||||
+ if request.node.name.startswith("test_invalid_event_loop"):
|
||||
+ return asyncio.WindowsSelectorEventLoopPolicy()
|
||||
+ else:
|
||||
+ return asyncio.WindowsProactorEventLoopPolicy()
|
||||
+ return asyncio.DefaultEventLoopPolicy()
|
||||
|
||||
|
||||
if sys.platform.startswith("win") and sys.version_info < (3, 8):
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 11 00:43:47 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Refresh patch py314-fix-tests.patch:
|
||||
* Ignore DeprecationWarning about asyncio event loop policies.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 15 09:11:10 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user