Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage/doctest/control.py: Fixup handling of sage_optional_tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Oct 3, 2021
1 parent 5e04a85 commit 66cf3e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sage/doctest/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from .external import external_software, available_software

nodoctest_regex = re.compile(r'\s*(#+|%+|r"+|"+|\.\.)\s*nodoctest')
optionaltag_regex = re.compile(r'^\w+$')
optionaltag_regex = re.compile(r'^(\w|[.])+$')

# Optional tags which are always automatically added

Expand All @@ -53,9 +53,6 @@
except ImportError:
pass

from sage.features.sagemath import sage_optional_tags
auto_optional_tags.update(sage_optional_tags())

class DocTestDefaults(SageObject):
"""
This class is used for doctesting the Sage doctest module.
Expand Down Expand Up @@ -374,6 +371,9 @@ def __init__(self, options, args):
from sage.features import package_systems
options.optional.update(system.name for system in package_systems())

from sage.features.sagemath import sage_optional_tags
options.optional.update(sage_optional_tags())

# Check that all tags are valid
for o in options.optional:
if not optionaltag_regex.search(o):
Expand Down

0 comments on commit 66cf3e1

Please sign in to comment.