summaryrefslogtreecommitdiff
path: root/dev-python/pytest-twisted
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-26 14:52:16 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-26 14:52:16 +0100
commitc3d998909264b1ff687b9c65cae3046443e66f7e (patch)
treeed7aa279f601f6c46fb8b7425bd2a051b72be8d6 /dev-python/pytest-twisted
parentcf91c70bb5a537972156006c46756b9ac75bdb7b (diff)
gentoo auto-resync : 26:08:2022 - 14:52:16
Diffstat (limited to 'dev-python/pytest-twisted')
-rw-r--r--dev-python/pytest-twisted/Manifest3
-rw-r--r--dev-python/pytest-twisted/metadata.xml20
-rw-r--r--dev-python/pytest-twisted/pytest-twisted-1.13.4-r1.ebuild44
3 files changed, 67 insertions, 0 deletions
diff --git a/dev-python/pytest-twisted/Manifest b/dev-python/pytest-twisted/Manifest
new file mode 100644
index 000000000000..2895b6dbb224
--- /dev/null
+++ b/dev-python/pytest-twisted/Manifest
@@ -0,0 +1,3 @@
+DIST pytest-twisted-1.13.4.gh.tar.gz 15687 BLAKE2B 8e1024da02a5a1c9c33df96c18a355b9be5757446d9f5495ba1f043c15a2e44efd6e59693986a0684d77b8518393ce9f382d62e3d1e5b903876e8cff34efb427 SHA512 99899ad73f87582023a0e639986a287b4571638be4f1ae134078a15a4d4bebd24153f813c993382603edc14306c12931e2daf517d7998e48d3d19b8469c0b7aa
+EBUILD pytest-twisted-1.13.4-r1.ebuild 1158 BLAKE2B 13734da7c123143f84933d48b959de7284d68885ef8424281ba003a089a0020a68f69a42e1143fce9c22a1e454a13591c86f744282aec12b8f23b470eac1ecc7 SHA512 bf84b144513435fe6fa49e9c0376e952b54032cd495cd3ca5a1455b42cf226091123fabf95936993b263f6a9d606bc843ef503a236c657450d6e1f6ec616d8c0
+MISC metadata.xml 642 BLAKE2B c081296008b9003b05ba94fa6942b41818d3b68a8ca143437fc134b44c39d392f5cb05f2c65ed8a7b7d4f0115ae68c986bc6bf60d9a7d624919e20a9d2cc06d6 SHA512 4abfad276da1a0915bab78a189519900b71d5e87a71ca93332381d08af734128fe8cc1a325945ab33b3098a51a7d62ba53525615a6345419b5f94bb4c8f59438
diff --git a/dev-python/pytest-twisted/metadata.xml b/dev-python/pytest-twisted/metadata.xml
new file mode 100644
index 000000000000..864118bb47ad
--- /dev/null
+++ b/dev-python/pytest-twisted/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>Matt.Jolly@footclan.ninja</email>
+ <name>Matt Jolly</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Gentoo Proxy Maintainers Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">pytest-dev/pytest-twisted</remote-id>
+ <remote-id type="pypi">pytest-twisted</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pytest-twisted/pytest-twisted-1.13.4-r1.ebuild b/dev-python/pytest-twisted/pytest-twisted-1.13.4-r1.ebuild
new file mode 100644
index 000000000000..b00774122031
--- /dev/null
+++ b/dev-python/pytest-twisted/pytest-twisted-1.13.4-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..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"
+SRC_URI="https://github.com/pytest-dev/pytest-twisted/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc"
+
+RDEPEND="
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/greenlet[${PYTHON_USEDEP}]
+ >=dev-python/pytest-2.3[${PYTHON_USEDEP}]
+ dev-python/twisted[${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
+}