'Make sure the parsed_results match expected_output.'

def _MatchPCIDeviceResultToExpected(self, parsed_results, expected_output):

    self.assertEqual(len(parsed_results), len(expected_output))
    results = sorted(parsed_results, key=operator.attrgetter('device'))
    outputs = sorted(expected_output, key=operator.attrgetter('device'))
    for (result, output) in zip(results, outputs):
        self.assertEqual(result.domain, output.domain)
        self.assertEqual(result.bus, output.bus)
        self.assertEqual(result.device, output.device)
        self.assertEqual(result.function, output.function)
        self.assertEqual(result.class_id, output.class_id)
        self.assertEqual(result.vendor, output.vendor)
        self.assertEqual(result.vendor_device_id, output.vendor_device_id)
        self.assertEqual(result.config, output.config)
