Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/sage/doctest/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ def run_doctests(self):
sage: DC.expand_files_into_sources()
sage: DC.run_doctests()
Doctesting 1 file.
sage -t .../sage/rings/homset.py
.../sage/rings/homset.py
[... tests, ...s wall]
----------------------------------------------------------------------
All tests passed!
Expand Down Expand Up @@ -1201,7 +1201,7 @@ def cleanup(self, final=True):
sage: DC.run()
Running doctests with ID ...
Doctesting 1 file.
sage -t .../rings/all.py
.../rings/all.py
[... tests, ...s wall]
----------------------------------------------------------------------
All tests passed!
Expand Down Expand Up @@ -1403,7 +1403,7 @@ def run(self):
sage: DC.run()
Running doctests with ID ...
Doctesting 1 file.
sage -t .../sage/sets/non_negative_integers.py
.../sage/sets/non_negative_integers.py
[... tests, ...s wall]
----------------------------------------------------------------------
All tests passed!
Expand All @@ -1427,7 +1427,7 @@ def run(self):
Using --optional=external,sage
Features to be detected: ...
Doctesting 1 file.
sage -t ....py
....py
[0 tests, ...s wall]
----------------------------------------------------------------------
All tests passed!
Expand All @@ -1453,7 +1453,7 @@ def run(self):
Using --optional=sage...
Features to be detected: ...
Doctesting 1 file.
sage -t ....py
....py
[4 tests, ...s wall]
----------------------------------------------------------------------
All tests passed!
Expand All @@ -1471,7 +1471,7 @@ def run(self):
Using --optional=sage
Features to be detected: ...
Doctesting 1 file.
sage -t ....py
....py
[4 tests, ...s wall]
----------------------------------------------------------------------
All tests passed!
Expand Down Expand Up @@ -1597,7 +1597,7 @@ def run_doctests(module, options=None):
sage: run_doctests(sage.rings.all)
Running doctests with ID ...
Doctesting 1 file.
sage -t .../sage/rings/all.py
.../sage/rings/all.py
[... tests, ...s wall]
----------------------------------------------------------------------
All tests passed!
Expand Down
18 changes: 9 additions & 9 deletions src/sage/doctest/forker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1781,9 +1781,9 @@ def serial_dispatch(self):
sage: DC.dispatcher = DD
sage: DC.timer = Timer().start()
sage: DD.serial_dispatch()
sage -t .../rings/homset.py
.../rings/homset.py
[... tests, ...s wall]
sage -t .../rings/ideal.py
.../rings/ideal.py
[... tests, ...s wall]
"""
for source in self.controller.sources:
Expand Down Expand Up @@ -1827,9 +1827,9 @@ def parallel_dispatch(self):
sage: DC.dispatcher = DD
sage: DC.timer = Timer().start()
sage: DD.parallel_dispatch()
sage -t .../databases/cremona.py
.../databases/cremona.py
[... tests, ...s wall]
sage -t .../rings/big_oh.py
.../rings/big_oh.py
[... tests, ...s wall]

If the ``exitfirst=True`` option is given, the results for a failing
Expand All @@ -1853,7 +1853,7 @@ def parallel_dispatch(self):
....: DC.dispatcher = DD
....: DC.timer = Timer().start()
....: DD.parallel_dispatch()
sage -t ...
...
**********************************************************************
File "...", line 2, in ...
Failed example:
Expand Down Expand Up @@ -2158,9 +2158,9 @@ def dispatch(self):
sage: DC.dispatcher = DD
sage: DC.timer = Timer().start()
sage: DD.dispatch()
sage -t .../sage/modules/free_module_homspace.py
.../sage/modules/free_module_homspace.py
[... tests, ...s wall]
sage -t .../sage/rings/big_oh.py
.../sage/rings/big_oh.py
[... tests, ...s wall]
"""
if self.controller.options.serial:
Expand Down Expand Up @@ -2223,7 +2223,7 @@ def __init__(self, source, options, funclist=[], baseline=None):
sage: run_doctests(sage.rings.big_oh) # indirect doctest
Running doctests with ID ...
Doctesting 1 file.
sage -t .../sage/rings/big_oh.py
.../sage/rings/big_oh.py
[... tests, ...s wall]
----------------------------------------------------------------------
All tests passed!
Expand Down Expand Up @@ -2270,7 +2270,7 @@ def run(self):
sage: run_doctests(sage.symbolic.units) # indirect doctest # needs sage.symbolic
Running doctests with ID ...
Doctesting 1 file.
sage -t .../sage/symbolic/units.py
.../sage/symbolic/units.py
[... tests, ...s wall]
----------------------------------------------------------------------
All tests passed!
Expand Down
22 changes: 11 additions & 11 deletions src/sage/doctest/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import re
import sys
from signal import SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM, Signals
from sys import stdout
from sys import argv, stdout

from sage.doctest.external import available_software
from sage.doctest.sources import DictAsObject
Expand Down Expand Up @@ -185,17 +185,17 @@ def report_head(self, source, fail_msg=None):
sage: DC = DocTestController(DD, [filename])
sage: DTR = DocTestReporter(DC)
sage: print(DTR.report_head(FDS))
sage -t .../sage/doctest/reporting.py
.../sage/doctest/reporting.py

The same with various options::

sage: DD.long = True
sage: print(DTR.report_head(FDS))
sage -t --long .../sage/doctest/reporting.py
... --long .../sage/doctest/reporting.py
sage: print(DTR.report_head(FDS, "Failed by self-sabotage"))
sage -t --long .../sage/doctest/reporting.py # Failed by self-sabotage
... --long .../sage/doctest/reporting.py # Failed by self-sabotage
"""
cmd = "sage -t"
cmd = "sage-runtests" if "sage-runtests" in argv[0] else "python3 -m sage.doctest"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change it from sage -t to sage-runtests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to minimize the wrapping layers - I didn't make it python3 -m sage.doctest unconditionally because sage may not be installed in the system python namespace

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay!

if self.controller.options.long:
cmd += " --long"

Expand Down Expand Up @@ -695,9 +695,9 @@ def finalize(self):
sage: DC.sources = [None] * 4 # to fool the finalize method
sage: DTR.finalize()
----------------------------------------------------------------------
sage -t .../sage/doctest/reporting.py # Timed out
sage -t .../sage/doctest/reporting.py # Bad exit: 3
sage -t .../sage/doctest/reporting.py # 1 doctest failed
.../sage/doctest/reporting.py # Timed out
.../sage/doctest/reporting.py # Bad exit: 3
.../sage/doctest/reporting.py # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 0.0 seconds
cpu time: 0.0 seconds
Expand All @@ -710,9 +710,9 @@ def finalize(self):
sage: DTR.finalize()
<BLANKLINE>
----------------------------------------------------------------------
sage -t .../sage/doctest/reporting.py # Timed out
sage -t .../sage/doctest/reporting.py # Bad exit: 3
sage -t .../sage/doctest/reporting.py # 1 doctest failed
.../sage/doctest/reporting.py # Timed out
.../sage/doctest/reporting.py # Bad exit: 3
.../sage/doctest/reporting.py # 1 doctest failed
Doctests interrupted: 4/6 files tested
----------------------------------------------------------------------
Total time for all tests: 0.0 seconds
Expand Down
Loading
Loading