Skip to content

Commit c5fa076

Browse files
author
Release Manager
committed
gh-37177: `sage -t`: Fix handling of `--probe all` broken by #36989 <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> Broken in 10.3.beta6: ``` ./sage -tp --probe all src/sage/doctest/util.py ... File "/Users/mkoeppe/s/sage/sage-rebasing/worktree- pristine/src/sage/doctest/parsing.py", line 919, in __init__ self.probed_tags = set(probed_tags) ^^^^^^^^^^^^^^^^ TypeError: 'bool' object is not iterable ---------------------------------------------------------------------- sage -t --random-seed=131361480585541724191127226366213696278 src/sage/doctest/util.py # TypeError in doctesting framework ``` <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #37177 Reported by: Matthias Köppe Reviewer(s):
2 parents acbe15d + 262f2bd commit c5fa076

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/sage/doctest/parsing.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ class SageDocTestParser(doctest.DocTestParser):
877877
optional_tags: Union[bool, set[str]]
878878
optional_only: bool
879879
optionals: dict[str, int]
880-
probed_tags: set[str]
880+
probed_tags: Union[bool, set[str]]
881881

882882
def __init__(self, optional_tags=(), long=False, *, probed_tags=(), file_optional_tags=()):
883883
r"""
@@ -916,7 +916,10 @@ def __init__(self, optional_tags=(), long=False, *, probed_tags=(), file_optiona
916916
self.optional_tags.remove('sage')
917917
else:
918918
self.optional_only = True
919-
self.probed_tags = set(probed_tags)
919+
if probed_tags is True:
920+
self.probed_tags = True
921+
else:
922+
self.probed_tags = set(probed_tags)
920923
self.file_optional_tags = set(file_optional_tags)
921924

922925
def __eq__(self, other):

0 commit comments

Comments
 (0)