Skip to content

Commit

Permalink
dev-python/black: Use pytest-forked to workaround fd leaks
Browse files Browse the repository at this point in the history
Use pytest-forked to workaround fd leaks in blackd that cause the test
suite to fail and hang on systems with high nproc (i.e. our arm64
and sparc devboxes).

Bug: psf/black#4504
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Oct 26, 2024
1 parent 279f2f6 commit 36d111c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dev-python/black/black-24.10.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,17 @@ BDEPEND="
dev-python/aiohttp-cors[${PYTHON_USEDEP}]
dev-python/colorama[${PYTHON_USEDEP}]
dev-python/parameterized[${PYTHON_USEDEP}]
dev-python/pytest-forked[${PYTHON_USEDEP}]
)
"

distutils_enable_tests pytest

python_test() {
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest
# pytest-forked to workaround fd leakage in blackd
# https://github.com/psf/black/issues/4504
epytest -p pytest_forked --forked
}

pkg_postinst() {
Expand Down

0 comments on commit 36d111c

Please sign in to comment.