git.iko.soy/typeable/nixpkgs
on master help sign in
sage: fix dochtml tests
commitb39142cd1fe7a29424d64c36da903bd767c83ca8 authorTimo Kaufmann <timokau@zoho.com> dateSun 21 Oct 2018, 17:55 (8 years ago) parent38c2be5
2 files changed+31
pkgs/applications/science/math/sage/patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch+26 pkgs/applications/science/math/sage/sage-src.nix+5
pkgs/applications/science/math/sage/patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patchnew file+26
@@ -0,0 +1,26 @@
1+From c8edfefbbec87ca776d3cf84ee895aac200dda40 Mon Sep 17 00:00:00 2001
2+From: Timo Kaufmann <timokau@zoho.com>
3+Date: Sun, 21 Oct 2018 17:52:40 +0200
4+Subject: [PATCH] Only test py2/py3 optional tests when all of sage is tested
5+
6+---
7+ src/sage/doctest/control.py | 3 ++-
8+ 1 file changed, 2 insertions(+), 1 deletion(-)
9+
10+diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py
11+index bf18df8b2b..b04af0e2e8 100644
12+--- a/src/sage/doctest/control.py
13++++ b/src/sage/doctest/control.py
14+@@ -362,7 +362,8 @@ class DocTestController(SageObject):
15+ if not optionaltag_regex.search(o):
16+ raise ValueError('invalid optional tag {!r}'.format(o))
17+
18+- options.optional |= auto_optional_tags
19++ if "sage" in options.optional:
20++ options.optional |= auto_optional_tags
21+
22+ self.options = options
23+
24+--
25+2.18.1
26+
pkgs/applications/science/math/sage/sage-src.nix+5
@@ -32,6 +32,11 @@ stdenv.mkDerivation rec {
3232 # case. For some yet unknown reason, that breaks the docbuild on nix and archlinux.
3333 # See https://groups.google.com/forum/#!msg/sage-packaging/VU4h8IWGFLA/mrmCMocYBwAJ.
3434 ./patches/revert-sphinx-always-fork.patch
35+
36+ # Make sure py2/py3 tests are only run when their expected context (all "sage"
37+ # tests) are also run. That is necessary to test dochtml individually. See
38+ # https://trac.sagemath.org/ticket/26110 for an upstream discussion.
39+ ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
3540 ];
3641
3742 packageUpgradePatches = [