dev-python/pytest-subprocess: Remove old

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2026-04-30 21:01:39 +02:00
parent ce92345d92
commit 6552771d0a
3 changed files with 0 additions and 103 deletions

View File

@@ -1,2 +1 @@
DIST pytest-subprocess-1.5.3.gh.tar.gz 36830 BLAKE2B 5bd696971ebf97722e0d5712ec57e8642e32187d22b91630c38f0945fc2b1ae35697c22efa4a8104406306482a2231dbe063c4607ed4c616cc3a564bb4b141fd SHA512 639195fdc77ed27efcc7fd7557cadd4f631b81de640754a4b4bcfbc0a9cc6f13efa3b4c38a59a49b594b9cc84baf1cfa97cf1a19e9be7ab7888854cf0057d355
DIST pytest-subprocess-1.5.4.gh.tar.gz 39954 BLAKE2B 55998187a3492dd418d394ed373b29238ff26a2a82e806cf0833adf5d1ef9a8003f2f1677f916528ff414faba5ef6f739740c999f2784538717aca8563a5ad90 SHA512 c1f4e7ca0c318a47caf74886f7352983e5bc90b8d29d206649beb570e32da1cd48c94f435aee2e802c1b66f79548b1b3846fe573a8b1df28a082b3369b1f664d

View File

@@ -1,53 +0,0 @@
From c9fbd11a1c4caea4b3fbc5114363a1c7fac4af38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Wed, 21 May 2025 15:29:55 +0200
Subject: [PATCH] Fix test_examples on Python 3.14
This is basically a followup of https://github.com/aklajnert/pytest-subprocess/pull/148
---
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
@@ -1,3 +1,4 @@
+import sys
from pathlib import Path
import pytest
@@ -39,18 +40,21 @@ def test_documentation(testdir, rst_file):
" os.chdir(os.path.dirname(__file__))\n\n"
)
- event_loop_fixture = (
- "\n\n"
- "@pytest.fixture(autouse=True)\n"
- "def event_loop(request):\n"
- " policy = asyncio.get_event_loop_policy()\n"
- ' if sys.platform == "win32":\n'
- " loop = asyncio.ProactorEventLoop()\n"
- " else:\n"
- " loop = policy.get_event_loop()\n"
- " yield loop\n"
- " loop.close()\n"
- )
+ if sys.version_info < (3, 8):
+ event_loop_fixture = (
+ "\n\n"
+ "@pytest.fixture(autouse=True)\n"
+ "def event_loop(request):\n"
+ " policy = asyncio.get_event_loop_policy()\n"
+ ' if sys.platform == "win32":\n'
+ " loop = asyncio.ProactorEventLoop()\n"
+ " else:\n"
+ " loop = policy.get_event_loop()\n"
+ " yield loop\n"
+ " loop.close()\n"
+ )
+ else:
+ event_loop_fixture = ""
code_blocks = "\n".join(get_code_blocks(ROOT_DIR / rst_file))
testdir.makepyfile(

View File

@@ -1,49 +0,0 @@
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( pypy3_11 python3_{11..14} )
inherit distutils-r1
DESCRIPTION="A plugin to fake subprocess for pytest"
HOMEPAGE="
https://github.com/aklajnert/pytest-subprocess/
https://pypi.org/project/pytest-subprocess/
"
SRC_URI="
https://github.com/aklajnert/pytest-subprocess/archive/${PV}.tar.gz
-> ${P}.gh.tar.gz
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
RDEPEND="
>=dev-python/pytest-4.0.0[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/anyio[${PYTHON_USEDEP}]
>=dev-python/docutils-0.12[${PYTHON_USEDEP}]
>=dev-python/pygments-2.0[${PYTHON_USEDEP}]
>=dev-python/pytest-asyncio-0.15.1[${PYTHON_USEDEP}]
dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
PATCHES=(
# https://github.com/aklajnert/pytest-subprocess/pull/185
"${FILESDIR}/${P}-py314.patch"
)
python_test() {
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
local -x PYTEST_PLUGINS=pytest_subprocess.fixtures,pytest_asyncio.plugin
epytest -p rerunfailures
}