From 465a1f69ff0e99f1236996dffbc7ef86c8b85236 Mon Sep 17 00:00:00 2001 From: Andrei Lapshin Date: Sun, 4 Jan 2026 09:45:16 +0100 Subject: [PATCH] python314Packages.fava-portfolio-returns: fix tests Fix test execution when running on darwin with sandbox enabled. --- .../python-modules/fava-portfolio-returns/default.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/fava-portfolio-returns/default.nix b/pkgs/development/python-modules/fava-portfolio-returns/default.nix index b539d281c094..14948206ac10 100644 --- a/pkgs/development/python-modules/fava-portfolio-returns/default.nix +++ b/pkgs/development/python-modules/fava-portfolio-returns/default.nix @@ -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 = {