'Test the DictReader function against csv data.
Given the parquet_file and csv_file representation, reads the parquet file using DictReader
and then compares the result to the csv_file using column agnostic ordering.'

def _test_file_custom(self, parquet_file, csv_file):

    expected_data = []
    with io.open(csv_file, u'r', encoding=u'utf-8') as f:
        expected_data = list(csv.reader(f, delimiter=PIPE_DELIM))
    actual_data = []
    with open(parquet_file, u'rb') as parquet_fo:
        actual_data = list(parquet.DictReader(parquet_fo))
    self.tc.assertEquals(len(expected_data), len(actual_data))
    footer = parquet.read_footer(parquet_file)
    cols = [s.name for s in footer.schema]
    for (expected, actual) in zip(expected_data, actual_data):
        self.tc.assertEquals(len(expected), len(actual))
        for (i, c) in enumerate([c for c in cols if (c in actual)]):
            self.tc.assertEquals(expected[i], (actual[c].decode(u'utf-8') if (type(actual[c]) is bytes) else str(actual[c])))
