def test_reset_temporal_axis(PM_da_control_3d_full): """Test whether correct new labels are set.""" smooth = 10 smooth_kws = {'time': smooth} first_ori = PM_da_control_3d_full.time[0].values first_actual = _reset_temporal_axis(PM_da_control_3d_full, smooth_kws=smooth_kws).time.values[0] first_expected = f'{first_ori}-{first_ori+smooth*1-1}' assert first_actual == first_expected
def test_reset_temporal_axis_lead(PM_da_initialized_3d_full): """Test whether correct new labels are set.""" smooth = 10 dim = 'lead' smooth_kws = {dim: smooth} first_ori = PM_da_initialized_3d_full.lead[0].values first_actual = _reset_temporal_axis(PM_da_initialized_3d_full, smooth_kws=smooth_kws)[dim].values[0] first_expected = f'{first_ori}-{first_ori+smooth*1-1}' assert first_actual == first_expected
def test_reset_temporal_axis(PM_ds_control_3d_full): """Test whether correct new labels are set.""" smooth = 10 tsmooth_kws = {"time": smooth} first_ori = PM_ds_control_3d_full.time[0].values first_actual = _reset_temporal_axis( PM_ds_control_3d_full, tsmooth_kws=tsmooth_kws, dim="time" ).time.values[0] first_expected = f"{first_ori}-{first_ori+smooth*1-1}" assert first_actual == first_expected
def test_reset_temporal_axis_lead(pm_da_ds3d): """Test whether correct new labels are set.""" smooth = 10 dim = 'lead' smooth_kws = {dim: smooth} first_ori = pm_da_ds3d.lead[0].values first_actual = _reset_temporal_axis(pm_da_ds3d, smooth_kws=smooth_kws)[dim].values[0] first_expected = f'{first_ori}-{first_ori+smooth*1-1}' assert first_actual == first_expected