commit:     0a2438863a2d5fdc52578566537d98895f1c4b30
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 19 06:48:00 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Mar 19 07:19:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a243886

dev-python/pytest-twisted: Bump to 1.14.1

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pytest-twisted/Manifest                 |  1 +
 .../pytest-twisted/pytest-twisted-1.14.1.ebuild    | 56 ++++++++++++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/dev-python/pytest-twisted/Manifest 
b/dev-python/pytest-twisted/Manifest
index 5dd091b55d26..0c501cb43335 100644
--- a/dev-python/pytest-twisted/Manifest
+++ b/dev-python/pytest-twisted/Manifest
@@ -1 +1,2 @@
 DIST pytest-twisted-1.14.0.gh.tar.gz 16234 BLAKE2B 
1f0470893135127111194dcb726e5c16c8ce6911456eae7068035a001010b2513f5b1d7507c84f8ebf183042144c3cec3fb4fd1f060d987f5e1f3c053f29ed0e
 SHA512 
d3c1b7320f87bd32bec992b807baf235c13e5595c93895eb7df91f709d7ab92dbbc30a47f4341477d7ba9541958efa1d4ef7d355023050747b401bb541314bc9
+DIST pytest-twisted-1.14.1.gh.tar.gz 17114 BLAKE2B 
36b851b734acc03919dc03842d942d205468375d9318d4ce4f880532fca29d31354125fd2ab8149a50bcf29e46ec812898b7167e34c0fa1276dcd5c2aa36ccd1
 SHA512 
d5b6d629ed3cf7ae1537e76494fa7eb4bbb9767cbc50d97a5657c668b381f39236acc6224b3754d62e2cccd4dff7e6161265ddc6a939f0488cef53eeade0eae9

diff --git a/dev-python/pytest-twisted/pytest-twisted-1.14.1.ebuild 
b/dev-python/pytest-twisted/pytest-twisted-1.14.1.ebuild
new file mode 100644
index 000000000000..71996ceec517
--- /dev/null
+++ b/dev-python/pytest-twisted/pytest-twisted-1.14.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1
+
+DESCRIPTION="A pytest plugin for testing Twisted framework consumers"
+HOMEPAGE="
+       https://github.com/pytest-dev/pytest-twisted/
+       https://pypi.org/project/pytest-twisted/
+"
+SRC_URI="
+       https://github.com/pytest-dev/pytest-twisted/archive/v${PV}.tar.gz
+               -> ${P}.gh.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~riscv ~x86"
+
+RDEPEND="
+       dev-python/decorator[${PYTHON_USEDEP}]
+       dev-python/greenlet[${PYTHON_USEDEP}]
+       >=dev-python/pytest-2.3[${PYTHON_USEDEP}]
+       dev-python/twisted[${PYTHON_USEDEP}]
+"
+BDEPEND="
+       test? (
+               dev-python/hypothesis[${PYTHON_USEDEP}]
+       )
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+       # If we let pytest-twisted autoload everywhere, it breaks tests in
+       # packages that don't expect it. Apply a similar hack as for bug
+       # #661218.
+       sed -e 's/"pytest11": \[[^]]*\]//' -i setup.py || die
+
+       # https://github.com/pytest-dev/pytest/issues/9280
+       sed -e '/^pytest_plugins =/d' -i testing/conftest.py || die
+
+       distutils-r1_src_prepare
+}
+
+python_test() {
+       local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+       local -x PYTEST_PLUGINS=pytest_twisted
+
+       epytest -p pytester
+}

Reply via email to