'Test that string-based classifiers produce pandas categoricals as their
outputs.'

def test_string_classifiers_produce_categoricals(self):

    col = TestingDataSet.categorical_col
    pipe = Pipeline(columns={'c': col.latest})
    run_dates = self.trading_days[(-10):]
    (start_date, end_date) = run_dates[[0, (-1)]]
    result = self.run_pipeline(pipe, start_date, end_date)
    assert isinstance(result.c.values, Categorical)
    expected_raw_data = self.raw_expected_values(col, start_date, end_date)
    expected_labels = LabelArray(expected_raw_data, col.missing_value)
    expected_final_result = expected_labels.as_categorical_frame(index=run_dates, columns=self.asset_finder.retrieve_all(self.asset_finder.sids))
    assert_frame_equal(result.c.unstack(), expected_final_result)
