testing/unexpected_passes_common/data_types_unittest.py
def testMissingKeys(self):
    """Tests that missing keys are properly copied to the base map."""
    base_map = data_types.TestExpectationMap({
        'foo':
        data_types.ExpectationBuilderMap({
            data_types.Expectation('foo', ['win'], 'Failure'):
            data_types.BuilderStepMap({
                'builder':
                data_types.StepBuildStatsMap({
                    'step': data_types.BuildStats(),
                }),
            }),
        }),
    })
    merge_map = data_types.TestExpectationMap({
        'foo':
        data_types.ExpectationBuilderMap({
            data_types.Expectation('foo', ['win'], 'Failure'):
            data_types.BuilderStepMap({
                'builder':
                data_types.StepBuildStatsMap({
                    'step2': data_types.BuildStats(),
                }),
                'builder2':
                data_types.StepBuildStatsMap({
                    'step': data_types.BuildStats(),
                }),
            }),
            data_types.Expectation('foo', ['mac'], 'Failure'):
            data_types.BuilderStepMap({
                'builder':
                data_types.StepBuildStatsMap({
                    'step': data_types.BuildStats(),
                })
            })
        }),
        'bar':
        data_types.ExpectationBuilderMap({
            data_types.Expectation('bar', ['win'], 'Failure'):
            data_types.BuilderStepMap({
                'builder':
                data_types.StepBuildStatsMap({
                    'step': data_types.BuildStats(),
                }),
            }),
        }),
    })
    expected_base_map = {
        'foo': {
            data_types.Expectation('foo', ['win'], 'Failure'): {
                'builder': {
                    'step': data_types.BuildStats(),
                    'step2': data_types.BuildStats(),
                },
                'builder2': {
                    'step': data_types.BuildStats(),
                },
            },
            data_types.Expectation('foo', ['mac'], 'Failure'): {
                'builder': {
                    'step': data_types.BuildStats(),
                }
            }
        },
        'bar': {
            data_types.Expectation('bar', ['win'], 'Failure'): {
                'builder': {
                    'step': data_types.BuildStats(),
                },
            },
        },
    }
    base_map.Merge(merge_map)
    self.assertEqual(base_map, expected_base_map)
Tests that missing keys are properly copied to the base map.
Tests that missing keys are properly copied to the base map.
Tests that missing keys are properly copied to the base map .
def testMissingKeys(self):
    base_map = data_types.TestExpectationMap({
        'foo':
        data_types.ExpectationBuilderMap({
            data_types.Expectation('foo', ['win'], 'Failure'):
            data_types.BuilderStepMap({
                'builder':
                data_types.StepBuildStatsMap({
                    'step': data_types.BuildStats(),
                }),
            }),
        }),
    })
    merge_map = data_types.TestExpectationMap({
        'foo':
        data_types.ExpectationBuilderMap({
            data_types.Expectation('foo', ['win'], 'Failure'):
            data_types.BuilderStepMap({
                'builder':
                data_types.StepBuildStatsMap({
                    'step2': data_types.BuildStats(),
                }),
                'builder2':
                data_types.StepBuildStatsMap({
                    'step': data_types.BuildStats(),
                }),
            }),
            data_types.Expectation('foo', ['mac'], 'Failure'):
            data_types.BuilderStepMap({
                'builder':
                data_types.StepBuildStatsMap({
                    'step': data_types.BuildStats(),
                })
            })
        }),
        'bar':
        data_types.ExpectationBuilderMap({
            data_types.Expectation('bar', ['win'], 'Failure'):
            data_types.BuilderStepMap({
                'builder':
                data_types.StepBuildStatsMap({
                    'step': data_types.BuildStats(),
                }),
            }),
        }),
    })
    expected_base_map = {
        'foo': {
            data_types.Expectation('foo', ['win'], 'Failure'): {
                'builder': {
                    'step': data_types.BuildStats(),
                    'step2': data_types.BuildStats(),
                },
                'builder2': {
                    'step': data_types.BuildStats(),
                },
            },
            data_types.Expectation('foo', ['mac'], 'Failure'): {
                'builder': {
                    'step': data_types.BuildStats(),
                }
            }
        },
        'bar': {
            data_types.Expectation('bar', ['win'], 'Failure'): {
                'builder': {
                    'step': data_types.BuildStats(),
                },
            },
        },
    }
    base_map.Merge(merge_map)
    self.assertEqual(base_map, expected_base_map)
def testMissingKeys ( self ) : base_map = data_types . TestExpectationMap ( { 'foo' : data_types . ExpectationBuilderMap ( { data_types . Expectation ( 'foo' , [ 'win' ] , 'Failure' ) : data_types . BuilderStepMap ( { 'builder' : data_types . StepBuildStatsMap ( { 'step' : data_types . BuildStats ( ) , } ) , } ) , } ) , } ) merge_map = data_types . TestExpectationMap ( { 'foo' : data_types . ExpectationBuilderMap ( { data_types . Expectation ( 'foo' , [ 'win' ] , 'Failure' ) : data_types . BuilderStepMap ( { 'builder' : data_types . StepBuildStatsMap ( { 'step2' : data_types . BuildStats ( ) , } ) , 'builder2' : data_types . StepBuildStatsMap ( { 'step' : data_types . BuildStats ( ) , } ) , } ) , data_types . Expectation ( 'foo' , [ 'mac' ] , 'Failure' ) : data_types . BuilderStepMap ( { 'builder' : data_types . StepBuildStatsMap ( { 'step' : data_types . BuildStats ( ) , } ) } ) } ) , 'bar' : data_types . ExpectationBuilderMap ( { data_types . Expectation ( 'bar' , [ 'win' ] , 'Failure' ) : data_types . BuilderStepMap ( { 'builder' : data_types . StepBuildStatsMap ( { 'step' : data_types . BuildStats ( ) , } ) , } ) , } ) , } ) expected_base_map = { 'foo' : { data_types . Expectation ( 'foo' , [ 'win' ] , 'Failure' ) : { 'builder' : { 'step' : data_types . BuildStats ( ) , 'step2' : data_types . BuildStats ( ) , } , 'builder2' : { 'step' : data_types . BuildStats ( ) , } , } , data_types . Expectation ( 'foo' , [ 'mac' ] , 'Failure' ) : { 'builder' : { 'step' : data_types . BuildStats ( ) , } } } , 'bar' : { data_types . Expectation ( 'bar' , [ 'win' ] , 'Failure' ) : { 'builder' : { 'step' : data_types . BuildStats ( ) , } , } , } , } base_map . Merge ( merge_map ) self . assertEqual ( base_map , expected_base_map )
Tests that missing keys are properly copied to the base map.
Tests that missing keys are properly copied to the base map .
"""Tests that missing keys are properly copied to the base map."""
self