3
0
Fork 0
forked from mirrors/nixpkgs

python3Packages.ibis-framework: use pytestCheckHook

This commit is contained in:
Phillip Cloud 2022-01-21 16:22:59 -05:00
parent 5c7f80c454
commit 7965b464ed
No known key found for this signature in database
GPG key ID: D908212070FD785E

View file

@ -2,6 +2,7 @@
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, atpublic
, cached-property
, clickhouse-driver
@ -77,6 +78,7 @@ buildPythonPackage rec {
] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
checkInputs = [
pytestCheckHook
click
pytest
pytest-mock
@ -99,6 +101,13 @@ buildPythonPackage rec {
"test_summary_non_numeric_group_by"
];
pytestFlagsArray = [
"--numprocesses $NIX_BUILD_CORES"
"ibis/tests"
"ibis/backends/tests"
"ibis/backends/{${lib.concatStringsSep "," backends}}/tests"
];
preCheck = ''
set -euo pipefail
@ -121,20 +130,6 @@ buildPythonPackage rec {
export PYTEST_BACKENDS="${backendsString}"
'';
checkPhase = ''
set -euo pipefail
runHook preCheck
pytest --numprocesses auto \
ibis/tests \
ibis/backends/tests \
ibis/backends/{${lib.concatStringsSep "," backends}}/tests \
-k '${lib.concatMapStringsSep " and " (test: "not ${test}") disabledTests}'
runHook postCheck
'';
pythonImportsCheck = [ "ibis" ] ++ (map (backend: "ibis.backends.${backend}") backends);
meta = with lib; {