testing/unexpected_passes_common/data_types_unittest.py
def testMismatches(self):
    """Tests that unmatched results get returned."""
    foo_match_result = data_types.Result('foo/test', ['win10'], 'Pass',
                                         'pixel_tests', 'build_id')
    foo_mismatch_result = data_types.Result('foo/not_a_test', ['win10'],
                                            'Failure', 'pixel_tests',
                                            'build_id')
    bar_result = data_types.Result('bar/test', ['win10'], 'Pass', 'pixel_tests',
                                   'build_id')
    expectation_map = self.GetEmptyMapForGenericFailureExpectation()
    unmatched_results = expectation_map.AddResultList(
        'builder', [foo_match_result, foo_mismatch_result, bar_result])
    self.assertEqual(len(set(unmatched_results)), 2)
    self.assertEqual(set(unmatched_results),
                     set([foo_mismatch_result, bar_result]))

    expected_expectation_map = self.GetPassedMapForExpectation(
        self.GetGenericFailureExpectation())
    self.assertEqual(expectation_map, expected_expectation_map)
Tests that unmatched results get returned.
Tests that unmatched results get returned.
Tests that unmatched results get returned .
def testMismatches(self):
    foo_match_result = data_types.Result('foo/test', ['win10'], 'Pass',
                                         'pixel_tests', 'build_id')
    foo_mismatch_result = data_types.Result('foo/not_a_test', ['win10'],
                                            'Failure', 'pixel_tests',
                                            'build_id')
    bar_result = data_types.Result('bar/test', ['win10'], 'Pass', 'pixel_tests',
                                   'build_id')
    expectation_map = self.GetEmptyMapForGenericFailureExpectation()
    unmatched_results = expectation_map.AddResultList(
        'builder', [foo_match_result, foo_mismatch_result, bar_result])
    self.assertEqual(len(set(unmatched_results)), 2)
    self.assertEqual(set(unmatched_results),
                     set([foo_mismatch_result, bar_result]))
    expected_expectation_map = self.GetPassedMapForExpectation(
        self.GetGenericFailureExpectation())
    self.assertEqual(expectation_map, expected_expectation_map)
def testMismatches ( self ) : foo_match_result = data_types . Result ( 'foo/test' , [ 'win10' ] , 'Pass' , 'pixel_tests' , 'build_id' ) foo_mismatch_result = data_types . Result ( 'foo/not_a_test' , [ 'win10' ] , 'Failure' , 'pixel_tests' , 'build_id' ) bar_result = data_types . Result ( 'bar/test' , [ 'win10' ] , 'Pass' , 'pixel_tests' , 'build_id' ) expectation_map = self . GetEmptyMapForGenericFailureExpectation ( ) unmatched_results = expectation_map . AddResultList ( 'builder' , [ foo_match_result , foo_mismatch_result , bar_result ] ) self . assertEqual ( len ( set ( unmatched_results ) ) , 2 ) self . assertEqual ( set ( unmatched_results ) , set ( [ foo_mismatch_result , bar_result ] ) ) expected_expectation_map = self . GetPassedMapForExpectation ( self . GetGenericFailureExpectation ( ) ) self . assertEqual ( expectation_map , expected_expectation_map )
Tests that unmatched results get returned.
Tests that unmatched results get returned .
"""Tests that unmatched results get returned."""
self