about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/math/sage/patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
blob: d5c19a54fd96d1fc5174c3cc441d9824e3246cea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From f5ea42a7aaed7611fb55b65897b9fcf2b7bcf97e 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 2d93841e50..6d156e29a1 100644
--- a/src/sage/doctest/control.py
+++ b/src/sage/doctest/control.py
@@ -375,7 +375,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.28.0