#6646: R doctest failed
------------------------+---------------------------------------------------
 Reporter:  adavid      |       Owner:  was       
     Type:  defect      |      Status:  new       
 Priority:  minor       |   Milestone:  sage-4.1.1
Component:  interfaces  |    Keywords:  doctest   
 Reviewer:              |      Author:            
   Merged:              |  
------------------------+---------------------------------------------------
 {{{
 sage -t  "devel/sage/sage/interfaces/r.py"
 **********************************************************************
 File "/home/anthonyd/sage-4.1.1.alpha0/devel/sage/sage/interfaces/r.py",
 line 83
 8:
     sage: r.completions('tes')
 Expected:
     ['testPlatformEquivalence', 'testVirtual']
 Got:
     <BLANKLINE>
     Building R command completion list (this takes
     a few seconds only the first time you do it).
     To force rebuild later, delete
 /home/anthonyd/.sage//r_commandlist.sobj.
     ['testPlatformEquivalence', 'testVirtual']
 **********************************************************************
 1 items had failures:
    1 of   3 in __main__.example_34
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file
 /home/anthonyd/sage-4.1.1.alpha0/tmp/.doctest_r.py


 cat /home/anthonyd/sage-4.1.1.alpha0/tmp/.doctest_r.py
 sage -t  "devel/sage/sage/interfaces/r.py"
 # -*- coding: utf-8 -*-
 from sage.all_cmdline import *;
 import sage.plot.plot; sage.plot.plot.DOCTEST_MODE=True

 def warning_function(f):
     import warnings

     def doctest_showwarning(message, category, filename, lineno, file=f,
 line=None):
         try:
             file.write(warnings.formatwarning(message, category,
 'doctest', lineno, line))
         except IOError:
             pass # the file (probably stdout) is invalid
     return doctest_showwarning

 def change_warning_output(file):
     import warnings
     warnings.showwarning = warning_function(file)
 def example_0():        r""">>> set_random_seed(0L)

 >>> change_warning_output(sys.stdout)


    T-Test using R

    Arguments:
       x, y -- vectors of same length
       conf_level -- confidence level of the interval, [0,1) in percent

    Result:
       Tuple: (p-value, R return object)

    Example:
       >>> a, b =
 
ttest([Integer(1),Integer(2),Integer(3),Integer(4),Integer(5)],[Integer(1),Integer(2),Integer(3),RealNumber('3.5'),RealNumber('5.121')]);
 a###line 30:_sage_    >>> a, b = ttest([1,2,3,4,5],[1,2,3,3.5,5.121]); a
       0.941026372027427
    """


 if __name__ ==  '__main__':
     verbose = False
     do_timeit = False
     output_filename =
 '/home/anthonyd/sage-4.1.1.alpha0/devel/sage/sage/stats/r.py.timeit.sobj'

     import sys
     sys.path = sys.path + ['/home/anthonyd/sage-4.1.1.alpha0/local/bin']
     import sagedoctest

     #
 execfile('/home/anthonyd/sage-4.1.1.alpha0/devel/sage/sage/stats/r.py')
     m = sys.modules[__name__]
     m.__file__ =
 '/home/anthonyd/sage-4.1.1.alpha0/devel/sage/sage/stats/r.py'

     # configure special sage doc test runner
     runner = sagedoctest.SageDocTestRunner(checker=None, verbose=verbose,
 optionflags=0)
     runner._collect_timeit_stats = do_timeit
     runner._reset_random_seed = True

     runner = sagedoctest.testmod_returning_runner(m,
                    #
 filename='/home/anthonyd/sage-4.1.1.alpha0/devel/sage/sage/stats/r.py',
                    verbose=verbose,
                    globs=globals(),
                    runner=runner)
     runner.save_timeit_stats_to_file_named(output_filename)
     quit_sage(verbose=False)
     sys.exit(runner.failures)
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6646>
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