From a66b2467a33e2eaa158080581f7dae1a5c22193b Mon Sep 17 00:00:00 2001 From: Zexin Yuan Date: Tue, 17 Jun 2025 22:21:27 +0800 Subject: [PATCH] python3Packages.swcgeom: enable tests --- .../python-modules/swcgeom/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/swcgeom/default.nix b/pkgs/development/python-modules/swcgeom/default.nix index 7de34846241a..e940ac5e6c49 100644 --- a/pkgs/development/python-modules/swcgeom/default.nix +++ b/pkgs/development/python-modules/swcgeom/default.nix @@ -22,7 +22,7 @@ lmdb, requests, urllib3, - pytest, + pytestCheckHook, }: let @@ -72,14 +72,19 @@ buildPythonPackage { ]; }; - nativeCheckInputs = [ - pytest - ]; - pythonImportsCheck = [ "swcgeom" ]; + nativeCheckInputs = [ + pytestCheckHook + ]; + + preCheck = '' + # make sure import the built version, not the source one + rm -r swcgeom + ''; + meta = { description = "Neuron geometry library for swc format"; homepage = "https://github.com/yzx9/swcgeom";