paperless-ngx: re-add xdist (#364966)

This commit is contained in:
Leona Maroni 2024-12-14 12:12:15 +01:00 committed by GitHub
commit 861f0baf72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -161,9 +161,12 @@ python.pkgs.buildPythonApplication rec {
];
postPatch = ''
# pytest-xdist makes the tests flaky
# pytest-xdist with to many threads makes the tests flaky
if (( $NIX_BUILD_CORES > 4)); then
NIX_BUILD_CORES=4
fi
substituteInPlace src/setup.cfg \
--replace-fail "--numprocesses auto --maxprocesses=16" ""
--replace-fail "--numprocesses auto --maxprocesses=16" "--numprocesses $NIX_BUILD_CORES"
'';
nativeBuildInputs = [
@ -277,9 +280,13 @@ python.pkgs.buildPythonApplication rec {
pytest-httpx
pytest-mock
pytest-rerunfailures
pytest-xdist
pytestCheckHook
];
# manually managed in postPatch
dontUsePytestXdist = false;
pytestFlagsArray = [
"src"
];