mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
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
1 changed files with 5 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue