summaryrefslogtreecommitdiff
path: root/dev-python/pytest-jobserver/pytest-jobserver-1.1.0.ebuild
blob: d07b28768c46af1aa1a069f75083514c448c2134 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=setuptools
PYPI_VERIFY_REPO=https://github.com/tommilligan/pytest-jobserver
PYTHON_COMPAT=( python3_{9,10,11,12,13} pypy3 )

inherit distutils-r1 pypi

DESCRIPTION="Limit parallel tests with POSIX jobserver"
HOMEPAGE="
	https://github.com/tommilligan/pytest-jobserver/
	https://pypi.org/project/pytest-jobserver/
"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~riscv ~s390 ~x86"

RDEPEND="
	dev-python/pytest[${PYTHON_USEDEP}]
"

EPYTEST_PLUGIN_LOAD_VIA_ENV=1
EPYTEST_PLUGINS=( "${PN}" pytest-xdist )
distutils_enable_tests pytest

python_test() {
	local EPYTEST_DESELECT=(
		pytest_jobserver/test/test_plugin.py::test_xdist_makeflags_fails
		# broken by implicit slot fix
		pytest_jobserver/test/test_plugin.py::test_jobserver_token_fixture
		pytest_jobserver/test/test_plugin.py::test_server_xdist
	)

	unset A MAKEFLAGS

	# missing conftest.py
	epytest -p pytester
}