From ee41532961ffc08a8d4b79607c354fa1a4340e40 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Tue, 10 Feb 2026 14:56:28 -0500 Subject: [PATCH] python3Packages.spherogram: add sage tests see https://github.com/3-manifolds/Spherogram/blob/2.4_as_released/.github/workflows/test.yml#L36 --- .../python-modules/spherogram/default.nix | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pkgs/development/python-modules/spherogram/default.nix b/pkgs/development/python-modules/spherogram/default.nix index 1589a8520e0f..7af4b90c6cef 100644 --- a/pkgs/development/python-modules/spherogram/default.nix +++ b/pkgs/development/python-modules/spherogram/default.nix @@ -14,6 +14,11 @@ networkx, snappy-15-knots, snappy-manifolds, + + # tests + runCommand, + sage, + writableTmpDirAsHomeHook, }: buildPythonPackage rec { @@ -50,6 +55,25 @@ buildPythonPackage rec { runHook postCheck ''; + passthru.tests.sage = + let + sage' = sage.override { + extraPythonPackages = ps: [ ps.spherogram ]; + requireSageTests = false; + }; + in + runCommand "spherogram-sage-tests" + { + nativeBuildInputs = [ + sage' + writableTmpDirAsHomeHook + ]; + } + '' + sage -python -m spherogram.test + touch $out + ''; + meta = { description = "Spherical diagrams for 3-manifold topology"; homepage = "https://snappy.computop.org/spherogram.html";