python314Packages.fava-portfolio-returns: fix tests

Fix test execution when running on darwin with sandbox enabled.
This commit is contained in:
Andrei Lapshin
2026-01-04 09:45:16 +01:00
parent 7874c5b0c3
commit 465a1f69ff
@@ -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 = {