def assertSampleListsEqualUpToTimestamp(self, a, b, msg=None):

    self.assertEqual(len(a), len(b),
                     msg or 'Lists %s and %s are not the same length' % (a, b))
    for i in xrange(len(a)):
      self.assertIsInstance(a[i], sample.Sample,
                            msg or ('%s (item %s in list) is '
                                    'not a sample.Sample object' %
                                    (a[i], i)))
      self.assertIsInstance(b[i], sample.Sample,
                            msg or ('%s (item %s in list) is '
                                    'not a sample.Sample object' %
                                    (b[i], i)))
      try:
        self.assertSamplesEqualUpToTimestamp(a[i], b[i], msg=msg)
      except self.failureException as ex:
        ex.message = ex.message + (' (was item %s in list)' % i)
        ex.args = (ex.message,)
        raise ex
Compare two lists of samples.
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/test_util.py/SamplesTestMixin.assertSampleListsEqualUpToTimestamp