def doTest(self, data, num_streams, interval, correct_answer):
    output = analysis.GapStats(
        data['start_time'], data['duration'], data['stream_num'],
        interval, num_streams)

    for name, value in output.iteritems():
      if name not in correct_answer:
        raise KeyError('GapStats produced key %s not in correct output %s' %
                       (name, str(correct_answer)))
      self.assertEqual(value, correct_answer[name])
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/tests/object_storage_multistream_analysis_test.py/TestGapStats.doTest/original