'Check previous value results for a single column.'

def check_previous_value_results(self, column, results, dates):

    self.assert_result_contains_all_sids(results)
    events = self.raw_events_no_nulls
    dates = dates.tz_localize(None)
    for (asset, asset_result) in results.iteritems():
        relevant_events = events[(events.sid == asset.sid)]
        self.assertEqual(len(relevant_events), 2)
        (v1, v2) = relevant_events[self.previous_value_columns[column]]
        event1_first_eligible = max(relevant_events.iloc[0].loc[['event_date', 'timestamp']])
        event2_first_eligible = max(relevant_events.iloc[1].loc[['event_date', 'timestamp']])
        for (date, computed_value) in zip(dates, asset_result):
            if (date >= event2_first_eligible):
                self.assertEqual(computed_value, v2)
            elif (date >= event1_first_eligible):
                self.assertEqual(computed_value, v1)
            else:
                assert_equal(computed_value, column.missing_value, allow_datetime_coercions=True)
