python310Packages.pytest-xdist: 2.5.0 -> 3.1.0
https://github.com/pytest-dev/pytest-xdist/blob/v3.1.0/CHANGELOG.rst
This commit is contained in:
parent
6d9c724458
commit
44f365a931
2 changed files with 23 additions and 17 deletions
|
@ -7,32 +7,47 @@
|
||||||
, filelock
|
, filelock
|
||||||
, execnet
|
, execnet
|
||||||
, pytest
|
, pytest
|
||||||
, pytest-forked
|
|
||||||
, psutil
|
, psutil
|
||||||
, pexpect
|
, setproctitle
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pytest-xdist";
|
pname = "pytest-xdist";
|
||||||
version = "2.5.0";
|
version = "3.1.0";
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-RYDeyj/wTdsqxT66Oddstd1e3qwFDLb7x2iw3XErTt8=";
|
hash = "sha256-QP2481RJIcXfzUhqwIDOIocOcdgs7W0uePqXwq3dSAw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ setuptools-scm ];
|
nativeBuildInputs = [
|
||||||
|
setuptools-scm
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pytest
|
pytest
|
||||||
];
|
];
|
||||||
checkInputs = [ pytestCheckHook filelock pexpect ];
|
|
||||||
propagatedBuildInputs = [ execnet pytest-forked psutil ];
|
propagatedBuildInputs = [
|
||||||
|
execnet
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
filelock
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
passthru.optional-dependencies = {
|
||||||
|
psutil = [ psutil ];
|
||||||
|
setproctitle = [ setproctitle ];
|
||||||
|
};
|
||||||
|
|
||||||
pytestFlagsArray = [
|
pytestFlagsArray = [
|
||||||
# pytest can already use xdist at this point
|
# pytest can already use xdist at this point
|
||||||
"--numprocesses=$NIX_BUILD_CORES"
|
"--numprocesses=$NIX_BUILD_CORES"
|
||||||
"--forked"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# access file system
|
# access file system
|
||||||
|
|
|
@ -1,16 +1,7 @@
|
||||||
pytestXdistHook() {
|
pytestXdistHook() {
|
||||||
pytestFlagsArray+=(
|
pytestFlagsArray+=(
|
||||||
"--numprocesses=$NIX_BUILD_CORES"
|
"--numprocesses=$NIX_BUILD_CORES"
|
||||||
"--forked"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Using --forked on darwin leads to crashes when fork safety is
|
|
||||||
# enabled. This often happens when urllib tries to request proxy
|
|
||||||
# settings on MacOS through `urllib.request.getproxies()`
|
|
||||||
# - https://github.com/python/cpython/issues/77906
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
||||||
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# the flags should be added before pytestCheckHook runs so
|
# the flags should be added before pytestCheckHook runs so
|
||||||
|
|
Loading…
Reference in a new issue