def test_convert_index_from_UTC(self): out = tstoolbox.convert_index('number', input_ts='tests/data_sunspot.csv', interval='M', epoch='1850-01-01') out.index.name = '1850-01-01_date' assert_frame_equal(out, self.read_direct)
def test_raises(): with pytest.raises(ValueError): out = tstoolbox.convert_index( "zebra", input_ts="tests/data_gainesville_daily_precip.csv", interval="D", epoch="julian", )
def test_epoch_interval(epoch, interval, expected): out = tstoolbox.convert_index( "number", input_ts="tests/data_gainesville_daily_precip.csv", interval=interval, epoch=epoch, ) assert out.index[1] == expected
def test_convert_index_from_UTC(self): out = tstoolbox.convert_index( "number", input_ts="tests/data_gainesville_daily_precip.csv", interval="D", epoch="1979-12-30", ) out.index.name = "1979-12-30_date" assert_frame_equal(out, self.read_direct)