Unverified Commit c23f21be authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

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.
parent cfd186f0
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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" ];