#9449: The summary printed after running doctests is inaccurate.
------------------------+---------------------------------------------------
Reporter: drkirkby | Owner: mvngu
Type: defect | Status: new
Priority: major | Milestone: sage-4.5
Component: doctest | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
Comment(by 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...
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9449#comment:17>
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.