#13928: Problematic file filter in skip() from sage-ptest
---------------------------------+------------------------------------------
       Reporter:  ncohen         |         Owner:  mvngu       
           Type:  defect         |        Status:  needs_review
       Priority:  major          |     Milestone:  sage-5.6    
      Component:  doctest        |    Resolution:              
       Keywords:                 |   Work issues:              
Report Upstream:  N/A            |     Reviewers:              
        Authors:  Nathann Cohen  |     Merged in:              
   Dependencies:                 |      Stopgaps:              
---------------------------------+------------------------------------------

Comment (by jhpalmieri):

 This looks okay to me after some superficial testing. We should still fix
 the issue where if the number of files is zero, it exits with a stupid
 error message. One possible fix is the first patch in [comment:11].
 Another option:
 {{{
 #!diff
 diff --git a/sage-ptest b/sage-ptest
 --- a/sage-ptest
 +++ b/sage-ptest
 @@ -429,6 +429,11 @@ for gr in range(0,numglobaliteration):
      interrupt = False

      numthreads = min(numthreads, len(files))  # don't use more threads
 than files
 +    if len(files) == 0:
 +        print """
 +Warning: no files to test!
 +"""
 +        sys.exit(0)

      if len(files) == 1:
          file_str = "1 file"
 }}}

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