def generate_and_compare(self, name):


        directory = os.path.abspath(os.path.dirname(__file__))
        name = os.path.join(directory, name)

        cds = CaseDataset(name + '.json', 'json')
        data = cds.data.fetch()
        caseset_query_to_csv(data, self.filename_csv)

        with open(name + '.csv', 'r') as inp1:
            expected = inp1.readlines()
        with open(self.filename_csv, 'r') as inp2:
            actual = inp2.readlines()

        # Strip off trailing whitespace (newlines and carriage returns)
        # Don't check time-stamp because some OS round it.
        for exp, act in zip(expected, actual):
            # skip timestamps, and uuids
            items2 = act.rstrip().split(",")[1:-3]
            for i, item1 in enumerate(exp.rstrip().split(",")[1:-3]):
                item2 = items2[i]
                try:  # (str).isnumeric() only works on unicode
                    item1, item2 = float(item1), float(item2)
                    # nan equality check fails by definition
                    if isnan(item1) and isnan(item2):
                        continue
                    self.assertAlmostEqual(item1, item2)
                except (ValueError, __HOLE__):
                    self.assertEqual(item1, item2)
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/casehandlers/test/test_csv_post_processor.py/CSVPostProcessorTestCase.generate_and_compare