diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-08-26 14:52:16 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-08-26 14:52:16 +0100 |
commit | c3d998909264b1ff687b9c65cae3046443e66f7e (patch) | |
tree | ed7aa279f601f6c46fb8b7425bd2a051b72be8d6 /dev-python/pytest-twisted/pytest-twisted-1.13.4-r1.ebuild | |
parent | cf91c70bb5a537972156006c46756b9ac75bdb7b (diff) |
gentoo auto-resync : 26:08:2022 - 14:52:16
Diffstat (limited to 'dev-python/pytest-twisted/pytest-twisted-1.13.4-r1.ebuild')
-rw-r--r-- | dev-python/pytest-twisted/pytest-twisted-1.13.4-r1.ebuild | 44 |
1 files changed, 44 insertions, 0 deletions
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 +} |