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

Commit 2938e13

Browse files
author
Matthias Koeppe
committed
src/sage/doctest/parsing.py: Allow . in optional tags
1 parent 9096edb commit 2938e13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sage/doctest/parsing.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from .external import available_software
3535

3636
float_regex = re.compile(r'\s*([+-]?\s*((\d*\.?\d+)|(\d+\.?))([eE][+-]?\d+)?)')
37-
optional_regex = re.compile(r'(arb216|arb218|py2|py3|long time|not implemented|not tested|known bug)|([^ a-z]\s*optional\s*[:-]*((\s|\w)*))')
37+
optional_regex = re.compile(r'(arb216|arb218|py2|py3|long time|not implemented|not tested|known bug)|([^ a-z]\s*optional\s*[:-]*((\s|\w|[.])*))')
3838
# Version 4.65 of glpk prints the warning "Long-step dual simplex will
3939
# be used" frequently. When Sage uses a system installation of glpk
4040
# which has not been patched, we need to ignore that message.
@@ -316,6 +316,8 @@ def parse_optional_tags(string):
316316
{''}
317317
sage: sorted(list(parse_optional_tags("sage: #optional -- foo bar, baz")))
318318
['bar', 'foo']
319+
sage: parse_optional_tags("sage: #optional -- foo.bar, baz")
320+
{'foo.bar'}
319321
sage: sorted(list(parse_optional_tags(" sage: factor(10^(10^10) + 1) # LoNg TiME, NoT TeSTED; OptioNAL -- P4cka9e")))
320322
['long time', 'not tested', 'p4cka9e']
321323
sage: parse_optional_tags(" sage: raise RuntimeError # known bug")

0 commit comments

Comments
 (0)