python3Packages.dtw-python: set pytestFlagsArray in preCheck hook
This flag relies on bash eval of pytestFlagsArray, which we'd like to get rid of. By moving the evaluation of $src into the preCheck hook, we achieve the same.
This commit is contained in:
parent
cfd186f097
commit
c23f21bead
@ -39,10 +39,12 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
# We need to run tests on real built package: https://github.com/NixOS/nixpkgs/issues/255262
|
||||
preCheck = "cd $out";
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
# tests/ are not included to output package, so we have to set path explicitly
|
||||
pytestFlagsArray = [ "$src/tests" ];
|
||||
preCheck = ''
|
||||
appendToVar pytestFlagsArray "$src/tests"
|
||||
cd $out
|
||||
'';
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
pythonImportsCheck = [ "dtw" ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user