testing/unexpected_passes_common/data_types_unittest.py
def testResultMatchPassingNew(self):
    """Test adding a passing result when no results for a builder exist."""
    r = data_types.Result('some/test/case', ['win', 'win10'], 'Pass',
                          'pixel_tests', 'build_id')
    e = data_types.Expectation('some/test/*', ['win10'], 'Failure')
    expectation_map = data_types.TestExpectationMap({
        'expectation_file':
        data_types.ExpectationBuilderMap({
            e: data_types.BuilderStepMap(),
        }),
    })
    grouped_results = {
        'some/test/case': [r],
    }
    matched_results = expectation_map._AddGroupedResults(
        grouped_results, 'builder', None)
    self.assertEqual(matched_results, set([r]))
    stats = data_types.BuildStats()
    stats.AddPassedBuild()
    expected_expectation_map = {
        'expectation_file': {
            e: {
                'builder': {
                    'pixel_tests': stats,
                },
            },
        },
    }
    self.assertEqual(expectation_map, expected_expectation_map)
Test adding a passing result when no results for a builder exist.
Test adding a passing result when no results for a builder exist.
Test adding a passing result when no results for a builder exist .
def testResultMatchPassingNew(self):
    r = data_types.Result('some/test/case', ['win', 'win10'], 'Pass',
                          'pixel_tests', 'build_id')
    e = data_types.Expectation('some/test/*', ['win10'], 'Failure')
    expectation_map = data_types.TestExpectationMap({
        'expectation_file':
        data_types.ExpectationBuilderMap({
            e: data_types.BuilderStepMap(),
        }),
    })
    grouped_results = {
        'some/test/case': [r],
    }
    matched_results = expectation_map._AddGroupedResults(
        grouped_results, 'builder', None)
    self.assertEqual(matched_results, set([r]))
    stats = data_types.BuildStats()
    stats.AddPassedBuild()
    expected_expectation_map = {
        'expectation_file': {
            e: {
                'builder': {
                    'pixel_tests': stats,
                },
            },
        },
    }
    self.assertEqual(expectation_map, expected_expectation_map)
def testResultMatchPassingNew ( self ) : r = data_types . Result ( 'some/test/case' , [ 'win' , 'win10' ] , 'Pass' , 'pixel_tests' , 'build_id' ) e = data_types . Expectation ( 'some/test/*' , [ 'win10' ] , 'Failure' ) expectation_map = data_types . TestExpectationMap ( { 'expectation_file' : data_types . ExpectationBuilderMap ( { e : data_types . BuilderStepMap ( ) , } ) , } ) grouped_results = { 'some/test/case' : [ r ] , } matched_results = expectation_map . _AddGroupedResults ( grouped_results , 'builder' , None ) self . assertEqual ( matched_results , set ( [ r ] ) ) stats = data_types . BuildStats ( ) stats . AddPassedBuild ( ) expected_expectation_map = { 'expectation_file' : { e : { 'builder' : { 'pixel_tests' : stats , } , } , } , } self . assertEqual ( expectation_map , expected_expectation_map )
Test adding a passing result when no results for a builder exist.
Test adding a passing result when no results for a builder exist .
"""Test adding a passing result when no results for a builder exist."""
self