From c38d70127d345f5b52987c55005e84ad90a5cb4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= Date: Mon, 10 May 2021 13:38:19 -0300 Subject: [PATCH] python3Packages.jupytext: fix tests Due to improper sandboxing, I didn't notice the failed tests while upgrading jupytext in #121648. The errors come from jupyter_core so the same fix is used here as there: set $HOME to a writable directory. --- pkgs/development/python-modules/jupytext/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/jupytext/default.nix b/pkgs/development/python-modules/jupytext/default.nix index e3de451cfe1..0b893f7776a 100644 --- a/pkgs/development/python-modules/jupytext/default.nix +++ b/pkgs/development/python-modules/jupytext/default.nix @@ -44,7 +44,9 @@ buildPythonPackage rec { jupyter_client notebook ]; - # pre-commit tests require a Git repository. + # Tests that use a Jupyter notebook require $HOME to be writable. + HOME = "$TMPDIR"; + # Pre-commit tests expect the source directory to be a Git repository. pytestFlagsArray = [ "--ignore-glob='tests/test_pre_commit_*.py'" ]; pythonImportsCheck = [ "jupytext" "jupytext.cli" ];