#14623: occasional doctest failure in test_graceful_exit
-------------------------------------+--------------------------------------
       Reporter:  vbraun             |         Owner:  roed     
           Type:  defect             |        Status:  new      
       Priority:  major              |     Milestone:  sage-5.10
      Component:  doctest framework  |    Resolution:           
       Keywords:                     |   Work issues:           
Report Upstream:  N/A                |     Reviewers:           
        Authors:                     |     Merged in:           
   Dependencies:                     |      Stopgaps:           
-------------------------------------+--------------------------------------
Description changed by vbraun:

Old description:

> The test will call a Python subprocess at a random moment and verify that
> GP/Pari shuts down. But depending on timings I get two different outputs:
> Either
> {{{
> An exception has occurred, use %tb to see the full traceback.
>
> SystemExit
>
> sage:
> Exiting Sage (CPU time 0m0.02s, Wall time 0m0.11s).
> Exiting spawned PARI/GP interpreter process.
> }}}
> or
> {{{
> Traceback (most recent call last)...
> TypeError: 'int' object is not callable
> Exiting Sage (CPU time 0m0.36s, Wall time 0m0.38s).
> Exiting spawned PARI/GP interpreter process.
> }}}
> But the doctest
> {{{
>     sage: str(P.stdout.read())  # long time
>     '...Exiting spawned PARI/GP interpreter process...'
> }}}
> matches only the former because of the somewhat convoluted quotation
> rules:
> {{{
> sage: repr("my 'foo' bar")   # output starts with single quote
> '"my \'foo\' bar"'
> sage: repr("my foo bar")     # output starts with double quote
> "'my foo bar'"
> }}}

New description:

 The test will call a Python subprocess at a random moment and verify that
 GP/Pari shuts down. But depending on timings I get two different outputs:
 Either
 {{{
 An exception has occurred, use %tb to see the full traceback.

 SystemExit

 sage:
 Exiting Sage (CPU time 0m0.02s, Wall time 0m0.11s).
 Exiting spawned PARI/GP interpreter process.
 }}}
 or
 {{{
 Traceback (most recent call last)...
 TypeError: 'int' object is not callable
 Exiting Sage (CPU time 0m0.36s, Wall time 0m0.38s).
 Exiting spawned PARI/GP interpreter process.
 }}}
 But the doctest
 {{{
     sage: P.stdout.read()  # long time
     '...Exiting spawned PARI/GP interpreter process...'
 }}}
 matches only the former because of the somewhat convoluted quotation rules
 if the string contains quotes:
 {{{
 sage: repr("my 'foo' bar")   # output starts with single quote
 '"my \'foo\' bar"'
 sage: repr("my foo bar")     # output starts with double quote
 "'my foo bar'"
 }}}

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14623#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to