diff options
author | Timo Kaufmann <timokau@zoho.com> | 2018-10-21 17:55:53 +0200 |
---|---|---|
committer | Timo Kaufmann <timokau@zoho.com> | 2018-10-21 19:17:07 +0200 |
commit | b39142cd1fe7a29424d64c36da903bd767c83ca8 (patch) | |
tree | ab22db13acebfd35aa3a59c0419fca4708700b6e | |
parent | 38c2be5ffe644b187625ef1b311f765dc82b238b (diff) | |
download | nixlib-b39142cd1fe7a29424d64c36da903bd767c83ca8.tar nixlib-b39142cd1fe7a29424d64c36da903bd767c83ca8.tar.gz nixlib-b39142cd1fe7a29424d64c36da903bd767c83ca8.tar.bz2 nixlib-b39142cd1fe7a29424d64c36da903bd767c83ca8.tar.lz nixlib-b39142cd1fe7a29424d64c36da903bd767c83ca8.tar.xz nixlib-b39142cd1fe7a29424d64c36da903bd767c83ca8.tar.zst nixlib-b39142cd1fe7a29424d64c36da903bd767c83ca8.zip |
sage: fix dochtml tests
-rw-r--r-- | pkgs/applications/science/math/sage/patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch | 26 | ||||
-rw-r--r-- | pkgs/applications/science/math/sage/sage-src.nix | 5 |
2 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/sage/patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch b/pkgs/applications/science/math/sage/patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch new file mode 100644 index 000000000000..2a7dc13756d9 --- /dev/null +++ b/pkgs/applications/science/math/sage/patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch @@ -0,0 +1,26 @@ +From c8edfefbbec87ca776d3cf84ee895aac200dda40 Mon Sep 17 00:00:00 2001 +From: Timo Kaufmann <timokau@zoho.com> +Date: Sun, 21 Oct 2018 17:52:40 +0200 +Subject: [PATCH] Only test py2/py3 optional tests when all of sage is tested + +--- + src/sage/doctest/control.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py +index bf18df8b2b..b04af0e2e8 100644 +--- a/src/sage/doctest/control.py ++++ b/src/sage/doctest/control.py +@@ -362,7 +362,8 @@ class DocTestController(SageObject): + if not optionaltag_regex.search(o): + raise ValueError('invalid optional tag {!r}'.format(o)) + +- options.optional |= auto_optional_tags ++ if "sage" in options.optional: ++ options.optional |= auto_optional_tags + + self.options = options + +-- +2.18.1 + diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 942ee5f22007..b86f9d1aa0de 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -32,6 +32,11 @@ stdenv.mkDerivation rec { # case. For some yet unknown reason, that breaks the docbuild on nix and archlinux. # See https://groups.google.com/forum/#!msg/sage-packaging/VU4h8IWGFLA/mrmCMocYBwAJ. ./patches/revert-sphinx-always-fork.patch + + # Make sure py2/py3 tests are only run when their expected context (all "sage" + # tests) are also run. That is necessary to test dochtml individually. See + # https://trac.sagemath.org/ticket/26110 for an upstream discussion. + ./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch ]; packageUpgradePatches = [ |