Skip to content

Commit 03c2986

Browse files
committed
src/sage/doctest/sources.py: add "long time" for two tests
Two calls to FileDocTestSource.create_doctests() in this file can take a while (about 5s) on the first run. This now triggers a "slow doctest" warning if you are unlucky, and is unusually annoying because doctesting this file is expected to produce no output in a doctest in src/sage/doctest/forker.py. We add "# long time" to correct that random doctest failure. In any case, the two tests do take a long time.
1 parent cb03043 commit 03c2986

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/sage/doctest/sources.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ def _process_doc(self, doctests: list[doctest.DocTest], doc, namespace, start):
219219
220220
EXAMPLES::
221221
222+
sage: # long time
222223
sage: from sage.doctest.control import DocTestDefaults
223224
sage: from sage.doctest.sources import FileDocTestSource
224225
sage: from sage.doctest.parsing import SageDocTestParser
@@ -931,6 +932,7 @@ def parse_docstring(self, docstring, namespace, start) -> list[doctest.DocTest]:
931932
932933
EXAMPLES::
933934
935+
sage: # long time
934936
sage: from sage.doctest.control import DocTestDefaults
935937
sage: from sage.doctest.sources import FileDocTestSource
936938
sage: from sage.doctest.parsing import SageDocTestParser

0 commit comments

Comments
 (0)