#9224: Unify sage-test and sage-ptest
---------------------------+------------------------------------------------
   Reporter:  mpatel       |       Owner:  mvngu
       Type:  enhancement  |      Status:  new  
   Priority:  minor        |   Milestone:       
  Component:  doctest      |    Keywords:       
     Author:               |    Upstream:  N/A  
   Reviewer:               |      Merged:       
Work_issues:               |  
---------------------------+------------------------------------------------

Comment(by ddrake):

 I'm looking at this, and it might be a bit trickier than I thought. Doing
 "sage -tp 1 ..." tests to see if Sage starts, which we don't want. That's
 easy to fix, though. What might be harder is that sage-ptest has some
 awful code in it. The test_file function, according to comments, is
 supposed to return a 4-tuple, but sometimes it returns a 3-tuple (line
 122); there's a bare "except", which is probably not a good idea; the
 function that processes the tuples just mentioned does this:
 {{{
   F = result[0]
   ret = result[1]
   finished_time = result[2]
   ol = result[3]
 }}}
 The "result" usually is a 4-tuple: (filename, return_code, time,
 some_string). But sometimes it returns a 3-tuple: (-5, 0, some_string). So
 the code above sometimes gets a filename for F, and sometimes gets the
 integer -5. Then there's this:
 {{{
   if ol!="" and (not ol.isspace()):
         if (ol[len(ol)-1]=="\n"):
             ol=ol[0:len(ol)-1]
         print ol
 }}}
 Why is that not
 {{{
   if ol and not ol.isspace():
     print ol.rstrip()
 }}}
 ? There is some strange stuff in sage-ptest.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9224#comment:3>
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