#12415: Update doctesting framework
-----------------------------------------------------------------------------------------------------------------------------------------+
       Reporter:  robertwb                                                      
                                                         |         Owner:  
mvngu         
           Type:  enhancement                                                   
                                                         |        Status:  
needs_work    
       Priority:  major                                                         
                                                         |     Milestone:  
sage-5.3      
      Component:  doctest                                                       
                                                         |    Resolution:       
         
       Keywords:                                                                
                                                         |   Work issues:       
         
Report Upstream:  N/A                                                           
                                                         |     Reviewers:  
Jeroen Demeyer
        Authors:  David Roe, Robert Bradshaw                                    
                                                         |     Merged in:       
         
   Dependencies:  #13147,#13146, #13145, #12723, #12392, #12393, #12395, 
#12396, #12397, #12381, #12382, #12383, #12384, #11871, #13195  |      
Stopgaps:                
-----------------------------------------------------------------------------------------------------------------------------------------+

Comment (by roed):

 Replying to [comment:105 jdemeyer]:
 > Just one failure remaining related to this ticket:
 > {{{
 > **********************************************************************
 > File "devel/sage/sage/doctest/control.py", line 258, in
 sage.doctest.control.DocTestController.add_files
 > Failed example:
 >     DC = DocTestController(DD, [])
 > Expected nothing
 > Got:
 >     Unable to open logfile at
 /release/merger/sage-5.1-12415/home/.sage//tmp/test.log
 >     Proceeding without logging.
 > sage -t devel/sage/sage/ext/gmp.pxi
 >     [0 tests, 0.0 s]
 > **********************************************************************
 > 1 items had failures:
 >    1 of  15 in sage.doctest.control.DocTestController.add_files
 > ***Test Failed*** 1 failures.
 > sage -t devel/sage/sage/doctest/control.py
 >     [115 tests, 3.6 s]
 > }}}
 >
 > But also the formatting of the above failure looks strange:
 >
 > 1) Why does
 > {{{
 > sage -t devel/sage/sage/ext/gmp.pxi
 >     [0 tests, 0.0 s]
 > }}}
 > appear in the middle of the failure?
 >
 > 2) Could you format the output as
 > {{{
 > sage -t devel/sage/sage/doctest/control.py
 > **********************************************************************
 > [...failure...]
 > **********************************************************************
 > 1 items had failures:
 >    1 of  15 in sage.doctest.control.DocTestController.add_files
 > ***Test Failed*** 1 failures.
 >     [115 tests, 3.6 s]
 > }}}
 >
 > I would even shorten the last two lines to
 > {{{
 >     [115 tests, 1 failed, 3.6 s]
 > }}}
 >
 > And I would add a function like
 > {{{
 > def count_noun(number, noun):
 >     if number == 1:
 >         return "1 %s"%noun
 >     else:
 >         return "%d %ss"%(number,noun)
 > }}}
 > So you can do
 > {{{
 > print count_noun(n, 'item'), "had failures"
 > }}}


 Cool.  I will work on these.

 I'm going to be mostly (or entirely) out of communication for the next few
 days.  Hopefully I'll have some changes available on Monday.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12415#comment:110>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to