'Simple checkpoints test that accepts a checkpoints dataframe and
the expected value for 2014-01-03.
The underlying data has value -1.0 on 2014-01-01 and 1.0 on 2014-01-04.
Parameters
checkpoints : pd.DataFrame
The checkpoints data.
ffilled_value : float, optional
The value to be read on the third, if not provided, it will be the
value in the base data that will be naturally ffilled there.'

def _test_checkpoints(self, checkpoints, ffilled_values=None):

    nassets = len(simple_asset_info)
    dates = pd.to_datetime(['2013-12-31', '2014-01-04'])
    asof_dates = (dates - pd.Timedelta(days=1))
    asof_dates_repeated = np.tile(asof_dates, nassets)
    timestamps = (asof_dates + pd.Timedelta(hours=23))
    timestamps_repeated = np.tile(timestamps, nassets)
    values = (np.arange(nassets) + 1)
    values = np.hstack((values[::(-1)], values))
    baseline = pd.DataFrame({'sid': np.tile(simple_asset_info.index, 2), 'value': values, 'asof_date': asof_dates_repeated, 'timestamp': timestamps_repeated})
    if (ffilled_values is None):
        ffilled_values = baseline.value.iloc[:nassets]
    updated_values = baseline.value.iloc[nassets:]
    expected_views = keymap(pd.Timestamp, {'2014-01-03': [ffilled_values], '2014-01-04': [updated_values]})
    with tmp_asset_finder(equities=simple_asset_info) as finder:
        expected_output = pd.DataFrame(list(concatv(ffilled_values, updated_values)), index=pd.MultiIndex.from_product((sorted(expected_views.keys()), finder.retrieve_all(simple_asset_info.index))), columns=('value',))
        self._run_pipeline(bz.data(baseline, name='expr', dshape=self.value_dshape), None, bz.data(checkpoints, name='expr_checkpoints', dshape=self.value_dshape), expected_views, expected_output, finder, calendar=pd.date_range('2014-01-01', '2014-01-04'), start=pd.Timestamp('2014-01-03'), end=dates[(-1)], window_length=1, compute_fn=op.itemgetter((-1)))
