@@ -264,7 +264,9 @@ def report(self, source, timeout, return_code, results, output, pid=None):
264
264
Output so far...
265
265
**********************************************************************
266
266
sage: DTR.stats
267
- {'sage.doctest.reporting': {'failed': True, 'walltime': 1000000.0}}
267
+ {'sage.doctest.reporting': {'failed': True,
268
+ 'ntests': 0,
269
+ 'walltime': 1000000.0}}
268
270
269
271
Or a process that returned a bad exit code::
270
272
@@ -275,7 +277,9 @@ def report(self, source, timeout, return_code, results, output, pid=None):
275
277
Output before trouble
276
278
**********************************************************************
277
279
sage: DTR.stats
278
- {'sage.doctest.reporting': {'failed': True, 'walltime': 1000000.0}}
280
+ {'sage.doctest.reporting': {'failed': True,
281
+ 'ntests': 0,
282
+ 'walltime': 1000000.0}}
279
283
280
284
Or a process that segfaulted::
281
285
@@ -287,7 +291,9 @@ def report(self, source, timeout, return_code, results, output, pid=None):
287
291
Output before trouble
288
292
**********************************************************************
289
293
sage: DTR.stats
290
- {'sage.doctest.reporting': {'failed': True, 'walltime': 1000000.0}}
294
+ {'sage.doctest.reporting': {'failed': True,
295
+ 'ntests': 0,
296
+ 'walltime': 1000000.0}}
291
297
292
298
Report a timeout with results and a ``SIGKILL``::
293
299
@@ -299,7 +305,9 @@ def report(self, source, timeout, return_code, results, output, pid=None):
299
305
Output before trouble
300
306
**********************************************************************
301
307
sage: DTR.stats
302
- {'sage.doctest.reporting': {'failed': True, 'walltime': 1000000.0}}
308
+ {'sage.doctest.reporting': {'failed': True,
309
+ 'ntests': 1,
310
+ 'walltime': 1000000.0}}
303
311
304
312
This is an internal error since results is None::
305
313
@@ -310,20 +318,23 @@ def report(self, source, timeout, return_code, results, output, pid=None):
310
318
All output
311
319
**********************************************************************
312
320
sage: DTR.stats
313
- {'sage.doctest.reporting': {'failed': True, 'walltime': 1000000.0}}
321
+ {'sage.doctest.reporting': {'failed': True,
322
+ 'ntests': 1,
323
+ 'walltime': 1000000.0}}
314
324
315
325
Or tell the user that everything succeeded::
316
326
317
327
sage: doctests, extras = FDS.create_doctests(globals())
318
- sage: runner = SageDocTestRunner(SageOutputChecker(), verbose=False, sage_options=DD, optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS)
328
+ sage: runner = SageDocTestRunner(SageOutputChecker(), verbose=False, sage_options=DD,
329
+ ....: optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS)
319
330
sage: Timer().start().stop().annotate(runner)
320
331
sage: D = DictAsObject({'err':None})
321
332
sage: runner.update_results(D)
322
333
0
323
334
sage: DTR.report(FDS, False, 0, (sum([len(t.examples) for t in doctests]), D), "Good tests")
324
335
[... tests, ... s]
325
336
sage: DTR.stats
326
- {'sage.doctest.reporting': {'walltime': ...}}
337
+ {'sage.doctest.reporting': {'ntests': ..., ' walltime': ...}}
327
338
328
339
Or inform the user that some doctests failed::
329
340
@@ -366,7 +377,8 @@ def report(self, source, timeout, return_code, results, output, pid=None):
366
377
sage: DC = DocTestController(DD, [filename])
367
378
sage: DTR = DocTestReporter(DC)
368
379
sage: doctests, extras = FDS.create_doctests(globals())
369
- sage: runner = SageDocTestRunner(SageOutputChecker(), verbose=False, sage_options=DD, optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS)
380
+ sage: runner = SageDocTestRunner(SageOutputChecker(), verbose=False, sage_options=DD,
381
+ ....: optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS)
370
382
sage: Timer().start().stop().annotate(runner)
371
383
sage: D = DictAsObject({'err':None})
372
384
sage: runner.update_results(D)
0 commit comments