Unverified Commit 465a1f69 authored by Andrei Lapshin's avatar Andrei Lapshin
Browse files

python314Packages.fava-portfolio-returns: fix tests

Fix test execution when running on darwin with sandbox enabled.
parent 7874c5b0
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
  buildPythonPackage,
  buildNpmPackage,
  fetchFromGitHub,
  stdenv,
  fava,
  hatch-vcs,
  hatchling,
@@ -71,16 +70,10 @@ buildPythonPackage {

  pythonImportsCheck = [ "fava_portfolio_returns" ];

  # Stay in the root of the repository, so that relative paths to example files
  # loaded by tests stay correct.
  # Remove `src` to avoid `PYTHONPATH` issues related to `pytestCheckHook` ([1])
  # Use importlib import mode to avoid `PYTHONPATH` issues related to `pytestCheckHook` ([1])
  # [1]: https://github.com/NixOS/nixpkgs/issues/255262
  preCheck = ''
    rm -rf src
  '';

  pytestFlags = [
    "${placeholder "out"}"
    "--import-mode=importlib"
  ];

  passthru = {