blob: 3e548b71707c419269b6f04592e26786d7c81f7d (
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
43
44
45
46
47
48
49
50
51
52
53
54
|
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_NO_NORMALIZE=1
PYTHON_COMPAT=( pypy3_11 python3_{11..14} )
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="~amd64"
RDEPEND="
dev-python/pytest[${PYTHON_USEDEP}]
"
PATCHES=(
# Combined Gentoo patches:
# 1. Update MAKEFLAGS parsing:
# https://github.com/tommilligan/pytest-jobserver/pull/147
# 2. Do not require FIFO:
# https://github.com/tommilligan/pytest-jobserver/pull/149
# 3. Acquire job tokens for test collection:
# https://github.com/tommilligan/pytest-jobserver/pull/150
# 4. Do not acquire tokens for gw0 (not submitted yet).
"${FILESDIR}/${P}-gentoo.patch"
)
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
}
|