python312Packages.ndindex: fix Hypothesis test timeouts (#378789)
This commit is contained in:
commit
220db205e6
@ -2,6 +2,7 @@
|
|||||||
lib,
|
lib,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
python,
|
||||||
|
|
||||||
# build-system
|
# build-system
|
||||||
cython,
|
cython,
|
||||||
@ -36,15 +37,28 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace pytest.ini \
|
substituteInPlace pytest.ini \
|
||||||
--replace "--flakes" ""
|
--replace-fail "--flakes" ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
optional-dependencies.arrays = [ numpy ];
|
optional-dependencies.arrays = [ numpy ];
|
||||||
|
|
||||||
pythonImportsCheck = [ "ndindex" ];
|
pythonImportsCheck = [ "ndindex" ];
|
||||||
|
|
||||||
|
# fix Hypothesis timeouts
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
cd $out
|
cd $out
|
||||||
|
|
||||||
|
echo > ${python.sitePackages}/ndindex/tests/conftest.py <<EOF
|
||||||
|
|
||||||
|
import hypothesis
|
||||||
|
|
||||||
|
hypothesis.settings.register_profile(
|
||||||
|
"ci",
|
||||||
|
deadline=None,
|
||||||
|
print_blob=True,
|
||||||
|
derandomize=True,
|
||||||
|
)
|
||||||
|
EOF
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
@ -54,8 +68,13 @@ buildPythonPackage rec {
|
|||||||
sympy
|
sympy
|
||||||
] ++ optional-dependencies.arrays;
|
] ++ optional-dependencies.arrays;
|
||||||
|
|
||||||
|
pytestFlagsArray = [
|
||||||
|
"--hypothesis-profile"
|
||||||
|
"ci"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "";
|
description = "Python library for manipulating indices of ndarrays";
|
||||||
homepage = "https://github.com/Quansight-Labs/ndindex";
|
homepage = "https://github.com/Quansight-Labs/ndindex";
|
||||||
changelog = "https://github.com/Quansight-Labs/ndindex/releases/tag/${version}";
|
changelog = "https://github.com/Quansight-Labs/ndindex/releases/tag/${version}";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user