diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py index f1a365166f6..6f036f746ef 100644 --- a/src/sage/doctest/control.py +++ b/src/sage/doctest/control.py @@ -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! @@ -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! @@ -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! @@ -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! @@ -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! @@ -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! @@ -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! diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py index da051eabe9f..17ae7663b71 100644 --- a/src/sage/doctest/forker.py +++ b/src/sage/doctest/forker.py @@ -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: @@ -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 @@ -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: @@ -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: @@ -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! @@ -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! diff --git a/src/sage/doctest/reporting.py b/src/sage/doctest/reporting.py index 0da96bbbcd8..a05b47c85d8 100644 --- a/src/sage/doctest/reporting.py +++ b/src/sage/doctest/reporting.py @@ -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 @@ -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" if self.controller.options.long: cmd += " --long" @@ -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 @@ -710,9 +710,9 @@ def finalize(self): 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 Doctests interrupted: 4/6 files tested ---------------------------------------------------------------------- Total time for all tests: 0.0 seconds diff --git a/src/sage/doctest/test.py b/src/sage/doctest/test.py index 42d41eee574..630730fadfc 100644 --- a/src/sage/doctest/test.py +++ b/src/sage/doctest/test.py @@ -29,7 +29,7 @@ ....: "--random-seed=0", "--optional=sage", "longtime.rst"], **kwds) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 longtime.rst + ... --warn-long 0.0 --random-seed=0 longtime.rst [0 tests, ...s wall] ---------------------------------------------------------------------- All tests passed! @@ -40,7 +40,7 @@ ....: "--random-seed=0", "--optional=sage", "-l", "longtime.rst"], **kwds) Running doctests... Doctesting 1 file. - sage -t --long --warn-long 0.0 --random-seed=0 longtime.rst + ... --long --warn-long 0.0 --random-seed=0 longtime.rst [1 test, ...s wall] ---------------------------------------------------------------------- All tests passed! @@ -54,7 +54,7 @@ ....: "--random-seed=0", "--optional=sage", "sleep2.rst"], **kwds) Running doctests... Doctesting 1 file. - sage -t --warn-long --random-seed=0 sleep2.rst + ... --warn-long --random-seed=0 sleep2.rst ********************************************************************** File "sleep2.rst", line 4, in sage.doctest.tests.sleep2 Warning: slow doctest: @@ -71,7 +71,7 @@ ....: "--random-seed=0", "--optional=sage", "sleep2.rst"], **kwds) Running doctests... Doctesting 1 file. - sage -t --warn-long --random-seed=0 sleep2.rst + ... --warn-long --random-seed=0 sleep2.rst ********************************************************************** ::warning title=Warning: slow doctest:,file=sleep2.rst,line=4::slow doctest:: Test ran for ...s cpu, ...s wall%0ACheck ran for ...s cpu, ...s wall%0A while walltime(t) < 2: pass @@ -90,7 +90,7 @@ ....: "--random-seed=0", "--optional=sage", "tolerance.rst"], **kwds) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 tolerance.rst + ... --warn-long 0.0 --random-seed=0 tolerance.rst ********************************************************************** File "tolerance.rst", line ..., in sage.doctest.tests.tolerance Failed example: @@ -160,7 +160,7 @@ ....: "--random-seed=0", "--optional=sage", "-i", "initial.rst"], **kwds) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 initial.rst + ... --warn-long 0.0 --random-seed=0 initial.rst ********************************************************************** File "initial.rst", line 4, in sage.doctest.tests.initial Failed example: @@ -180,7 +180,7 @@ ********************************************************************** ... ---------------------------------------------------------------------- - sage -t --warn-long 0.0 --random-seed=0 initial.rst # 5 doctests failed + ... --warn-long 0.0 --random-seed=0 initial.rst # 5 doctests failed ---------------------------------------------------------------------- ... 1 @@ -191,7 +191,7 @@ ....: "--random-seed=0", "--optional=sage", "--exitfirst", "initial.rst"], **kwds) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 initial.rst + ... --warn-long 0.0 --random-seed=0 initial.rst ********************************************************************** File "initial.rst", line 4, in sage.doctest.tests.initial Failed example: @@ -203,7 +203,7 @@ ********************************************************************** ... ---------------------------------------------------------------------- - sage -t --warn-long 0.0 --random-seed=0 initial.rst # 1 doctest failed + ... --warn-long 0.0 --random-seed=0 initial.rst # 1 doctest failed ---------------------------------------------------------------------- ... 1 @@ -219,13 +219,13 @@ ....: "--random-seed=0", "--optional=sage", "99seconds.rst"], **kwds2) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 99seconds.rst + ... --warn-long 0.0 --random-seed=0 99seconds.rst Timed out ********************************************************************** Tests run before process (pid=...) timed out: ... ---------------------------------------------------------------------- - sage -t --warn-long 0.0 --random-seed=0 99seconds.rst # Timed out + ... --warn-long 0.0 --random-seed=0 99seconds.rst # Timed out ---------------------------------------------------------------------- ... 4 @@ -236,7 +236,7 @@ ....: "--random-seed=0", "--optional=sage", "keyboardinterrupt.rst"], **kwds) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 keyboardinterrupt.rst + ... --warn-long 0.0 --random-seed=0 keyboardinterrupt.rst ********************************************************************** File "keyboardinterrupt.rst", line 11, in sage.doctest.tests.keyboardinterrupt Failed example: @@ -248,7 +248,7 @@ ********************************************************************** ... ---------------------------------------------------------------------- - sage -t --warn-long 0.0 --random-seed=0 keyboardinterrupt.rst # 1 doctest failed + ... --warn-long 0.0 --random-seed=0 keyboardinterrupt.rst # 1 doctest failed ---------------------------------------------------------------------- ... 1 @@ -314,7 +314,7 @@ ....: "--random-seed=0", "--optional=sage", "abort.rst"], **kwds) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 abort.rst + ... --warn-long 0.0 --random-seed=0 abort.rst Killed due to abort ********************************************************************** Tests run before process (pid=...) failed: @@ -327,7 +327,7 @@ ------------------------------------------------------------------------ ... ---------------------------------------------------------------------- - sage -t --warn-long 0.0 --random-seed=0 abort.rst # Killed due to abort + ... --warn-long 0.0 --random-seed=0 abort.rst # Killed due to abort ---------------------------------------------------------------------- ... 16 @@ -344,7 +344,7 @@ sage: print(proc.stdout.replace('sage:', 'sage').replace('....:', '')) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 fail_and_die.rst + ... --warn-long 0.0 --random-seed=0 fail_and_die.rst ********************************************************************** File "fail_and_die.rst", line 8, in sage.doctest.tests.fail_and_die Failed example: @@ -364,7 +364,7 @@ sage os.kill(os.getpid(), signal.SIGKILL) ## line 9 ## ********************************************************************** ---------------------------------------------------------------------- - sage -t --warn-long 0.0 --random-seed=0 fail_and_die.rst # Killed due to kill signal + ... --warn-long 0.0 --random-seed=0 fail_and_die.rst # Killed due to kill signal ---------------------------------------------------------------------- ... sage: proc.returncode @@ -376,7 +376,7 @@ ....: "--random-seed=0", "--optional=sage", "sig_on.rst"], **kwds) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 sig_on.rst + ... --warn-long 0.0 --random-seed=0 sig_on.rst ********************************************************************** File "sig_on.rst", line 6, in sage.doctest.tests.sig_on Failed example: @@ -390,7 +390,7 @@ 1 of 5 in sage.doctest.tests.sig_on [3 tests, 1 failure, ...] ---------------------------------------------------------------------- - sage -t --warn-long 0.0 --random-seed=0 sig_on.rst # 1 doctest failed + ... --warn-long 0.0 --random-seed=0 sig_on.rst # 1 doctest failed ---------------------------------------------------------------------- ... 1 @@ -405,7 +405,7 @@ sage: print(open(t).read()) # long time Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 simple_failure.rst + ... --warn-long 0.0 --random-seed=0 simple_failure.rst ********************************************************************** File "simple_failure.rst", line 7, in sage.doctest.tests.simple_failure Failed example: @@ -419,7 +419,7 @@ 1 of 5 in sage.doctest.tests.simple_failure [4 tests, 1 failure, ...] ---------------------------------------------------------------------- - sage -t --warn-long 0.0 --random-seed=0 simple_failure.rst # 1 doctest failed + ... --warn-long 0.0 --random-seed=0 simple_failure.rst # 1 doctest failed ---------------------------------------------------------------------- ... @@ -430,7 +430,7 @@ sage: print(open(t).read()) # long time Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 simple_failure.rst + ... --warn-long 0.0 --random-seed=0 simple_failure.rst ********************************************************************** File "simple_failure.rst", line 7, in sage.doctest.tests.simple_failure Failed example: @@ -444,7 +444,7 @@ 1 of 5 in sage.doctest.tests.simple_failure [4 tests, 1 failure, ...] ---------------------------------------------------------------------- - sage -t --warn-long 0.0 --random-seed=0 simple_failure.rst # 1 doctest failed + ... --warn-long 0.0 --random-seed=0 simple_failure.rst # 1 doctest failed ---------------------------------------------------------------------- ... @@ -455,7 +455,7 @@ ....: stdin=open(os.devnull), **kwds) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 simple_failure.rst + ... --warn-long 0.0 --random-seed=0 simple_failure.rst ********************************************************************** File "simple_failure.rst", line 7, in sage.doctest.tests.simple_failure Failed example: @@ -478,7 +478,7 @@ 1 of 5 in sage.doctest.tests.simple_failure [4 tests, 1 failure, ...] ---------------------------------------------------------------------- - sage -t --warn-long 0.0 --random-seed=0 simple_failure.rst # 1 doctest failed + ... --warn-long 0.0 --random-seed=0 simple_failure.rst # 1 doctest failed ---------------------------------------------------------------------- ... 1 @@ -491,7 +491,7 @@ exec gdb ... Running doctests... Doctesting 1 file... - sage -t... 1second.rst... + ... 1second.rst... [2 tests, ...s wall] ---------------------------------------------------------------------- All tests passed! @@ -515,7 +515,7 @@ ....: "--random-seed=0", "--optional=sage", "--show-skipped", "show_skipped.rst"], **kwds) Running doctests ... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 show_skipped.rst + ... --warn-long 0.0 --random-seed=0 show_skipped.rst 2 tests not run due to known bugs 1 gap test not run 1 long test not run @@ -534,7 +534,7 @@ ....: "--random-seed=0", "--show-skipped", "--optional=sage,gap", "show_skipped.rst"], **kwds) Running doctests ... Doctesting 1 file. - sage -t --long --warn-long 0.0 --random-seed=0 show_skipped.rst + ... --long --warn-long 0.0 --random-seed=0 show_skipped.rst 2 tests not run due to known bugs 1 not tested test not run 0 tests not run because we ran out of time @@ -549,7 +549,7 @@ ....: "--random-seed=0", "--show-skipped", "--optional=gAp", "show_skipped.rst"], **kwds) Running doctests ... Doctesting 1 file. - sage -t --long --warn-long 0.0 --random-seed=0 show_skipped.rst + ... --long --warn-long 0.0 --random-seed=0 show_skipped.rst 2 tests not run due to known bugs 1 not tested test not run 2 sage tests not run @@ -582,7 +582,7 @@ ....: "--random-seed=0", "--optional=sage", "atexit.rst"], **kwds2) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 atexit.rst + ... --warn-long 0.0 --random-seed=0 atexit.rst [3 tests, ...s wall] ---------------------------------------------------------------------- All tests passed! @@ -602,7 +602,7 @@ ....: "--random-seed=0", "--optional=sage", "random_seed.rst"], **kwds) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=0 random_seed.rst + ... --warn-long 0.0 --random-seed=0 random_seed.rst ********************************************************************** File "random_seed.rst", line 3, in sage.doctest.tests.random_seed Failed example: @@ -616,7 +616,7 @@ 1 of 2 in sage.doctest.tests.random_seed [1 test, 1 failure, ...s wall] ---------------------------------------------------------------------- - sage -t --warn-long 0.0 --random-seed=0 random_seed.rst # 1 doctest failed + ... --warn-long 0.0 --random-seed=0 random_seed.rst # 1 doctest failed ---------------------------------------------------------------------- ... 1 @@ -624,7 +624,7 @@ ....: "--random-seed=1", "--optional=sage", "random_seed.rst"], **kwds) Running doctests... Doctesting 1 file. - sage -t --warn-long 0.0 --random-seed=1 random_seed.rst + ... --warn-long 0.0 --random-seed=1 random_seed.rst [1 test, ...s wall] ---------------------------------------------------------------------- All tests passed! diff --git a/src/sage/tests/cmdline.py b/src/sage/tests/cmdline.py index 21a524a4382..8edf9a27c5b 100644 --- a/src/sage/tests/cmdline.py +++ b/src/sage/tests/cmdline.py @@ -302,7 +302,7 @@ Debugging requires single-threaded operation, setting number of threads to 1. Running doctests with ID... Doctesting 1 file. - sage -t ... + ... ********************************************************************** File "...", line 3, in ... Failed example: