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

scipy-svn at scipy.org scipy-svn at scipy.org
Mon Jan 29 09:19:32 CST 2007


Author: mattknox_ca
Date: 2007-01-29 09:19:29 -0600 (Mon, 29 Jan 2007)
New Revision: 2628

Modified:
   trunk/Lib/sandbox/timeseries/tests/test_timeseries.py
Log:
added tests for align_series (including a series of size zero also)

Modified: trunk/Lib/sandbox/timeseries/tests/test_timeseries.py
===================================================================
--- trunk/Lib/sandbox/timeseries/tests/test_timeseries.py	2007-01-29 15:18:45 UTC (rev 2627)
+++ trunk/Lib/sandbox/timeseries/tests/test_timeseries.py	2007-01-29 15:19:29 UTC (rev 2628)
@@ -28,7 +28,7 @@
 from timeseries import tseries
 #reload(tseries)
 from timeseries.tseries import Date, date_array_fromlist
-from timeseries.tseries import time_series, TimeSeries, adjust_endpoints, mask_period
+from timeseries.tseries import time_series, TimeSeries, adjust_endpoints, mask_period, align_series
 
 class test_creation(NumpyTestCase):
     "Base test class for MaskedArrays."
@@ -270,6 +270,12 @@
                                    end_date=Date('D', string='2007-01-31'))
         assert_equal(dseries.size, 26)
         assert_equal(dseries._mask, N.r_[series._mask[5:], [1]*16])
+        
+        empty_series = time_series([], freq='d')
+        a, b = align_series(series, empty_series)
+        assert_equal(a.start_date, b.start_date)
+        assert_equal(a.end_date, b.end_date)
+        
     #
     def test_maskperiod(self):        
         "Test mask_period"



More information about the Scipy-svn mailing list