#6543: [with patch, needs review] improve doctests for tachyon
----------------------------------------+-----------------------------------
 Reporter:  mhampton                    |       Owner:  mhampton                
        
     Type:  enhancement                 |      Status:  new                     
        
 Priority:  major                       |   Milestone:  sage-4.1.1              
        
Component:  graphics                    |    Keywords:  tachyon, graphics, 3d, 
raytracer
 Reviewer:  boothby, wstein, wcauchois  |      Author:                          
        
   Merged:                              |  
----------------------------------------+-----------------------------------

Comment(by mvngu):

 I got a hunk rejection on Sage 4.1.1.rc2:
 {{{
 [mv...@sage sage-main]$ hg qimport http://trac.sagemath.org/sage_trac/raw-
 attachment/ticket/6543/trac_6543_tachyon_doctests.4-1.patch && hg qpush
 adding trac_6543_tachyon_doctests.4-1.patch to series file
 applying trac_6543_tachyon_doctests.4-1.patch
 patching file sage/plot/plot3d/tachyon.py
 Hunk #19 FAILED at 1368
 1 out of 19 hunks FAILED -- saving rejects to file
 sage/plot/plot3d/tachyon.py.rej
 patch failed, unable to continue (try -v)
 patch failed, rejects left in working dir
 Errors during apply, please fix and refresh
 trac_6543_tachyon_doctests.4-1.patch
 }}}
 The relevant hunk is:
 {{{
 --- tachyon.py
 +++ tachyon.py
 @@ -985,6 +1369,22 @@

          return False

 -def tostr(s):
 +def tostr(s, length = 3, out_type = float):
 +    """
 +    Converts vector information to a space-seperated string.
 +
 +    EXAMPLES::
 +
 +        sage: from sage.plot.plot3d.tachyon import tostr
 +       sage: tostr((1,1,1))
 +       ' 1.0 1.0 1.0 '
 +       sage: tostr('2 3 2')
 +       '2 3 2'
 +    """
      if isinstance(s, str):
          return s
 +    output = ' '
 +    for an_item in s:
 +        output = output + str(out_type(an_item)) + ' '
 +    return output
 +
 }}}
 Note a typo in "space-seperated"; it should be "space-separated". One
 might also want to consider rebasing the patch
 `trac_6543_tachyon_doctests.4-1.patch` on top of #6727.

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