Changeset 1165
- Timestamp:
- 07/28/08 12:03:43 (4 months ago)
- Files:
-
- trunk/timeseries/scikits/timeseries/tests/test_dates.py (modified) (2 diffs)
- trunk/timeseries/scikits/timeseries/tests/test_extras.py (modified) (2 diffs)
- trunk/timeseries/scikits/timeseries/tests/test_timeseries.py (modified) (3 diffs)
- trunk/timeseries/scikits/timeseries/tests/test_trecords.py (modified) (2 diffs)
- trunk/timeseries/scikits/timeseries/tseries.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/timeseries/scikits/timeseries/tests/test_dates.py
r1151 r1165 14 14 15 15 import numpy as np 16 from scipy.testing import *16 from numpy.testing import * 17 17 18 18 from numpy import ma … … 970 970 #------------------------------------------------------------------------------ 971 971 if __name__ == "__main__": 972 nose.run(argv=['', __file__]) 972 run_module_suite() 973 trunk/timeseries/scikits/timeseries/tests/test_extras.py
r1044 r1165 12 12 13 13 import numpy as np 14 from scipy.testing import *14 from numpy.testing import * 15 15 from numpy.ma import masked 16 16 from numpy.ma.testutils import assert_equal, assert_almost_equal … … 78 78 #------------------------------------------------------------------------------ 79 79 if __name__ == "__main__": 80 nose.run(argv=['', __file__]) 80 run_module_suite() 81 trunk/timeseries/scikits/timeseries/tests/test_timeseries.py
r1125 r1165 13 13 import numpy as np 14 14 from numpy import bool_, complex_, float_, int_, object_ 15 from scipy.testing import *15 from numpy.testing import * 16 16 17 17 import numpy.ma as ma … … 332 332 # 333 333 test = series[:3] 334 assert(isinstance(test, TimeSeries)) 334 335 test_series = test._series 335 336 assert_equal(test_series._data, data[:3]._data) … … 1012 1013 #------------------------------------------------------------------------------ 1013 1014 if __name__ == "__main__": 1014 nose.run(argv=['', __file__]) 1015 run_module_suite() 1016 trunk/timeseries/scikits/timeseries/tests/test_trecords.py
r1044 r1165 19 19 from numpy.ma.mrecords import addfield 20 20 21 from scipy.testing import *21 from numpy.testing import * 22 22 from numpy.ma.testutils import assert_equal, assert_array_equal, assert_equal_records 23 23 … … 239 239 #------------------------------------------------------------------------------ 240 240 if __name__ == "__main__": 241 nose.run(argv=['', __file__]) 241 run_module_suite() 242 trunk/timeseries/scikits/timeseries/tseries.py
r1150 r1165 515 515 newseries = self.__getitem__(sindx) 516 516 except IndexError: 517 518 517 # We don't need to recheck the index: just raise an exception 519 518 if not recheck: 519 self.__class__ = _class 520 520 raise 521 521 # Maybe the index is a list of Dates ? … … 530 530 exc_info = sys.exc_info() 531 531 msg = "Invalid index or date '%s'" % indx 532 self.__class__ = _class 532 533 raise IndexError(msg), None, exc_info[2] 533 534 else: 534 535 newseries = self.__getitem__(indx) 535 536 dindx = indx 537 self.__class__ = _class 536 538 else: 537 539 newseries = self.__getitem__(indx) 538 540 dindx = indx 539 finally: 540 self.__class__ = _class 541 541 self.__class__ = _class 542 self.__class__ = _class 542 543 # Don't find the date if it's not needed...... 543 544 if np.isscalar(newseries) or (newseries is masked):
