#13884: Fix optional internet tests.
----------------------------+-----------------------------------------------
       Reporter:  robertwb  |         Owner:  mvngu   
           Type:  defect    |        Status:  new     
       Priority:  major     |     Milestone:  sage-5.6
      Component:  doctest   |    Resolution:          
       Keywords:            |   Work issues:          
Report Upstream:  N/A       |     Reviewers:          
        Authors:            |     Merged in:          
   Dependencies:            |      Stopgaps:          
----------------------------+-----------------------------------------------

Comment (by kcrisman):

 Okay, the following patch fixes everything not from #10358, #7771, and the
 change in the CSV files that the Google Finance API produces.  (Note that
 Apple must have had a 4-1 stock split at some point as well.) In some
 cases I could circumvent the latter when the point wasn't testing
 historical data, but there are still two failures.
 {{{

 sage -t --only_optional=internet "devel/sage/sage/finance/stock.py"
 **********************************************************************
     sage: finance.Stock('F').google('Jan+3,+1978', 'Jul+7,+2008')[:5] #
 optional -- internet
 Expected:
     [
       3-Jan-78 0.00 1.93 1.89 1.89    1618200,
       4-Jan-78 0.00 1.89 1.87 1.88    2482700,
       5-Jan-78 0.00 1.89 1.84 1.84    2994900,
       6-Jan-78 0.00 1.84 1.82 1.83    3042500,
       9-Jan-78 0.00 1.81 1.79 1.81    3916400
     ]
 Got:
     [
      20-Aug-92 0.00 2.26 2.21 2.24   19202479,
      21-Aug-92 0.00 2.27 2.19 2.20   18689616,
      24-Aug-92 0.00 2.17 2.10 2.10   38652825,
      25-Aug-92 0.00 2.19 2.11 2.18   31028049,
      26-Aug-92 0.00 2.21 2.18 2.20   22539411
     ]
 **********************************************************************
     sage: sage.finance.stock.Stock("AAPL",
 22144).google(startdate='Jan+1,+1990')[:5] #optional -- internet
 Expected:
     [
       2-Jan-90 0.00 9.38 8.75 9.31    6542800,
       3-Jan-90 0.00 9.50 9.38 9.38    7428400,
       4-Jan-90 0.00 9.69 9.31 9.41    7911200,
       5-Jan-90 0.00 9.56 9.25 9.44    4404000,
       8-Jan-90 0.00 9.50 9.25 9.50    3627600
     ]
 Got:
     [
      28-Feb-97 0.00 1.05 1.02 1.02   17411200,
       3-Mar-97 0.00 1.03 1.00 1.01   18636800,
       4-Mar-97 0.00 1.03 1.00 1.03   14745600,
       5-Mar-97 0.00 1.06 1.03 1.06   13737600,
       6-Mar-97 0.00 1.06 1.03 1.04   16612800
     ]
 **********************************************************************
 }}}
 I don't know if these are fixable.

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