#9449: The summary printed after running doctests is inaccurate.
------------------------+---------------------------------------------------
   Reporter:  drkirkby  |       Owner:  mvngu     
       Type:  defect    |      Status:  new       
   Priority:  major     |   Milestone:  sage-4.5.1
  Component:  doctest   |    Keywords:            
     Author:            |    Upstream:  N/A       
   Reviewer:            |      Merged:            
Work_issues:            |  
------------------------+---------------------------------------------------

Comment(by drkirkby):

 Replying to [comment:17 leif]:
 > I don't know if ''this'' one is the origin, but it's simply
 '''horrible''':
 > {{{
 > #!python
 > def test_file(F):
 >     """
 >     This is the function that actually tests a file
 >     """
 >     outfile = tempfile.NamedTemporaryFile()
 >     base, ext = os.path.splitext(F)
 >
 >     cmd = 'doctest ' + opts
 >     if SAGE_SITE in os.path.realpath(F) and not '-force_lib' in cmd:
 >         cmd += ' -force_lib'
 >
 >     filestr = os.path.split(F)[1]
 >     for i in range(0,numiteration):
 >         os.chdir(os.path.dirname(F))
 >         command = os.path.join(SAGE_ROOT, 'local', 'bin', 'sage-%s' %
 cmd)
 >         s = 'bash -c "%s %s > %s" ' % (command, filestr, outfile.name)
 >         try:
 >             t = time.time()
 >             ret = os.system(s)
 >             finished_time = time.time() - t
 >             if ret>=256:
 >                 ret=ret/256
 >             ret = -ret
 >         except:
 >             ol = outfile.read()
 >             return (-5, 0, ol)
 >         ol = outfile.read()
 >         if ret != 0:
 >             break
 >     return (F, ret, finished_time, ol)
 > }}}
 > (Excerpt from {{{sage-ptest}}}, note not just the returned tuples...)
 >
 > Beat me if I've missed something here...
 >
 I barely know Python, so there is nothing I can do about this. But if you
 have a better solution, it would be worth trying it. I feel a bit uneasy
 about Sage, when we can't trust the mechanism for testing it.

 It's odd why failures on some test is pretty repeatable when running
 {{{make ptestlong}}} but run individually, they pass. I'm pretty sure that
 is not a memory issue, as I've noticed that on my Sun Blade 2000 SPARC
 where I'm the only user. That machine has 8 GB RAM and only two processors
 (its not multi-cored or multi-threaded), so I don't run more than 3 tests
 in parallel.

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