Skip to content

Commit

Permalink
src/sage/doctest/parsing.py: Fix handling of '--probe all'
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jan 28, 2024
1 parent 3dd953c commit 1ada49c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sage/doctest/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ class SageDocTestParser(doctest.DocTestParser):
optional_tags: Union[bool, set[str]]
optional_only: bool
optionals: dict[str, int]
probed_tags: set[str]
probed_tags: Union[bool, set[str]]

def __init__(self, optional_tags=(), long=False, *, probed_tags=(), file_optional_tags=()):
r"""
Expand Down Expand Up @@ -916,7 +916,10 @@ def __init__(self, optional_tags=(), long=False, *, probed_tags=(), file_optiona
self.optional_tags.remove('sage')
else:
self.optional_only = True
self.probed_tags = set(probed_tags)
if probed_tags is True:
self.probed_tags = True

Check warning on line 920 in src/sage/doctest/parsing.py

View check run for this annotation

Codecov / codecov/patch

src/sage/doctest/parsing.py#L920

Added line #L920 was not covered by tests
else:
self.probed_tags = set(probed_tags)
self.file_optional_tags = set(file_optional_tags)

def __eq__(self, other):
Expand Down

0 comments on commit 1ada49c

Please sign in to comment.