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

scipy-svn at scipy.org scipy-svn at scipy.org
Fri Jan 26 16:00:01 CST 2007


Author: mattknox_ca
Date: 2007-01-26 15:59:58 -0600 (Fri, 26 Jan 2007)
New Revision: 2620

Modified:
   trunk/Lib/sandbox/timeseries/tests/test_timeseries.py
Log:
added tests for handling empty TimeSeries objects

Modified: trunk/Lib/sandbox/timeseries/tests/test_timeseries.py
===================================================================
--- trunk/Lib/sandbox/timeseries/tests/test_timeseries.py	2007-01-26 21:56:53 UTC (rev 2619)
+++ trunk/Lib/sandbox/timeseries/tests/test_timeseries.py	2007-01-26 21:59:58 UTC (rev 2620)
@@ -297,6 +297,14 @@
         assert_equal(tmp._dates, series._dates)
         assert_equal(tmp._mask, series._mask)
         
+    def test_empty_timeseries(self):
+        "Tests that empty TimeSeries are  handled properly"
+        empty_ts = time_series([], freq='b')
+        assert_array_equal(empty_ts, empty_ts + 1)
+        assert_array_equal(empty_ts, empty_ts + empty_ts)
+        assert_equal(empty_ts.start_date, None)
+        assert_equal(empty_ts.end_date, None)
+        
 ###############################################################################
 #------------------------------------------------------------------------------
 if __name__ == "__main__":



More information about the Scipy-svn mailing list