[Scipy-svn] r2578 - trunk/Lib/sandbox/timeseries/tests

scipy-svn at scipy.org scipy-svn at scipy.org
Wed Jan 17 13:25:19 CST 2007


Author: mattknox_ca
Date: 2007-01-17 13:25:10 -0600 (Wed, 17 Jan 2007)
New Revision: 2578

Modified:
   trunk/Lib/sandbox/timeseries/tests/test_timeseries.py
Log:
added test for creating time series where data is a list

Modified: trunk/Lib/sandbox/timeseries/tests/test_timeseries.py
===================================================================
--- trunk/Lib/sandbox/timeseries/tests/test_timeseries.py	2007-01-17 19:18:58 UTC (rev 2577)
+++ trunk/Lib/sandbox/timeseries/tests/test_timeseries.py	2007-01-17 19:25:10 UTC (rev 2578)
@@ -24,10 +24,10 @@
 import maskedarray.testutils
 from maskedarray.testutils import assert_equal, assert_array_equal
 
-import tseries
+from timeseries import tseries
 #reload(tseries)
-from tseries import Date, date_array_fromlist
-from tseries import time_series, TimeSeries, adjust_endpoints, mask_period
+from timeseries.tseries import Date, date_array_fromlist
+from timeseries.tseries import time_series, TimeSeries, adjust_endpoints, mask_period
 
 class test_creation(NumpyTestCase):
     "Base test class for MaskedArrays."
@@ -69,6 +69,12 @@
         assert_equal(series._series, data)
         assert_equal(series._dates, dates)
         assert_equal(series.freq, 'D')
+        
+    def test_datafromlist(self):
+        (_, dates, _) = self.d
+        data = list(range(15))
+        series = time_series(data, dates)
+        assert_equal(series._data.size, 15)
 #...............................................................................
 
 class test_arithmetics(NumpyTestCase):



More information about the Scipy-svn mailing list