mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-09 15:13:31 -04:00
dev-python/syrupy: fix autoloading-related test failures
Explicitly load required plugins (syrupy, xdist) for nested pytest instances instead of relying on plugin autoloading. Signed-off-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
This commit is contained in:
@@ -28,5 +28,12 @@ BDEPEND="
|
|||||||
"
|
"
|
||||||
|
|
||||||
EPYTEST_PLUGINS=( pytest-xdist )
|
EPYTEST_PLUGINS=( pytest-xdist )
|
||||||
EPYTEST_PLUGIN_AUTOLOAD=1
|
|
||||||
distutils_enable_tests pytest
|
distutils_enable_tests pytest
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
distutils-r1_src_prepare
|
||||||
|
|
||||||
|
# Inject required plugins; autoloading can break (e.g., with pytest-relaxed)
|
||||||
|
sed -i 's/\([a-zA-Z0-9_]\+\)\.runpytest(/\1.runpytest("-p", "syrupy", "-p", "xdist", /' \
|
||||||
|
tests/integration/test_*.py || die
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user