Skip to content

Commit

Permalink
dev-python/pytest-xvfb: Fix tests with random plugins
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Nov 25, 2023
1 parent 6616f0c commit 50edb13
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions dev-python/pytest-xvfb/pytest-xvfb-3.0.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ DISTUTILS_USE_PEP517=setuptools
PYPI_NO_NORMALIZE=1
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_REQ_USE="tk"

inherit distutils-r1 pypi

DESCRIPTION="Pytest plugin to run Xvfb for tests"
HOMEPAGE="https://pypi.org/project/pytest-xvfb/"
HOMEPAGE="
https://github.com/The-Compiler/pytest-xvfb/
https://pypi.org/project/pytest-xvfb/
"

LICENSE="MIT"
SLOT="0"
Expand All @@ -19,10 +23,13 @@ KEYWORDS="amd64 ~arm ~arm64 ~riscv x86"
RDEPEND="
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/pyvirtualdisplay[${PYTHON_USEDEP}]
x11-base/xorg-server[xvfb]"
x11-base/xorg-server[xvfb]
"

distutils_enable_tests pytest

python_test() {
epytest -p xvfb --runpytest=subprocess
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
local -x PYTEST_PLUGINS=pytest_xvfb
epytest --runpytest=subprocess
}

0 comments on commit 50edb13

Please sign in to comment.