testing/unexpected_passes_common/data_types_unittest.py
def testActiveExpectations(self):
    """Tests output when only active expectations are provided."""
    expectation_map = data_types.TestExpectationMap({
        'foo':
        data_types.ExpectationBuilderMap({
            data_types.Expectation('foo', ['win'], ['Failure']):
            data_types.BuilderStepMap({
                'foo_builder':
                data_types.StepBuildStatsMap({
                    'step1':
                    uu.CreateStatsWithPassFails(0, 1),
                    'step2':
                    uu.CreateStatsWithPassFails(0, 2),
                }),
                'bar_builder':
                data_types.StepBuildStatsMap({
                    'step1':
                    uu.CreateStatsWithPassFails(0, 3),
                    'step2':
                    uu.CreateStatsWithPassFails(0, 4)
                }),
            }),
            data_types.Expectation('foo', ['linux'], ['RetryOnFailure']):
            data_types.BuilderStepMap({
                'foo_builder':
                data_types.StepBuildStatsMap({
                    'step1':
                    uu.CreateStatsWithPassFails(0, 5),
                    'step2':
                    uu.CreateStatsWithPassFails(0, 6),
                }),
            }),
        }),
        'bar':
        data_types.ExpectationBuilderMap({
            data_types.Expectation('bar', ['win'], ['Failure']):
            data_types.BuilderStepMap({
                'foo_builder':
                data_types.StepBuildStatsMap({
                    'step1':
                    uu.CreateStatsWithPassFails(0, 7),
                }),
            }),
        }),
    })
    expected_active_dict = copy.deepcopy(expectation_map)
    stale_dict, semi_stale_dict, active_dict =\
        expectation_map.SplitByStaleness()
    self.assertEqual(stale_dict, {})
    self.assertEqual(semi_stale_dict, {})
    self.assertEqual(active_dict, expected_active_dict)
Tests output when only active expectations are provided.
Tests output when only active expectations are provided.
Tests output when only active expectations are provided .
def testActiveExpectations(self):
    expectation_map = data_types.TestExpectationMap({
        'foo':
        data_types.ExpectationBuilderMap({
            data_types.Expectation('foo', ['win'], ['Failure']):
            data_types.BuilderStepMap({
                'foo_builder':
                data_types.StepBuildStatsMap({
                    'step1':
                    uu.CreateStatsWithPassFails(0, 1),
                    'step2':
                    uu.CreateStatsWithPassFails(0, 2),
                }),
                'bar_builder':
                data_types.StepBuildStatsMap({
                    'step1':
                    uu.CreateStatsWithPassFails(0, 3),
                    'step2':
                    uu.CreateStatsWithPassFails(0, 4)
                }),
            }),
            data_types.Expectation('foo', ['linux'], ['RetryOnFailure']):
            data_types.BuilderStepMap({
                'foo_builder':
                data_types.StepBuildStatsMap({
                    'step1':
                    uu.CreateStatsWithPassFails(0, 5),
                    'step2':
                    uu.CreateStatsWithPassFails(0, 6),
                }),
            }),
        }),
        'bar':
        data_types.ExpectationBuilderMap({
            data_types.Expectation('bar', ['win'], ['Failure']):
            data_types.BuilderStepMap({
                'foo_builder':
                data_types.StepBuildStatsMap({
                    'step1':
                    uu.CreateStatsWithPassFails(0, 7),
                }),
            }),
        }),
    })
    expected_active_dict = copy.deepcopy(expectation_map)
    stale_dict, semi_stale_dict, active_dict =\
        expectation_map.SplitByStaleness()
    self.assertEqual(stale_dict, {})
    self.assertEqual(semi_stale_dict, {})
    self.assertEqual(active_dict, expected_active_dict)
def testActiveExpectations ( self ) : expectation_map = data_types . TestExpectationMap ( { 'foo' : data_types . ExpectationBuilderMap ( { data_types . Expectation ( 'foo' , [ 'win' ] , [ 'Failure' ] ) : data_types . BuilderStepMap ( { 'foo_builder' : data_types . StepBuildStatsMap ( { 'step1' : uu . CreateStatsWithPassFails ( 0 , 1 ) , 'step2' : uu . CreateStatsWithPassFails ( 0 , 2 ) , } ) , 'bar_builder' : data_types . StepBuildStatsMap ( { 'step1' : uu . CreateStatsWithPassFails ( 0 , 3 ) , 'step2' : uu . CreateStatsWithPassFails ( 0 , 4 ) } ) , } ) , data_types . Expectation ( 'foo' , [ 'linux' ] , [ 'RetryOnFailure' ] ) : data_types . BuilderStepMap ( { 'foo_builder' : data_types . StepBuildStatsMap ( { 'step1' : uu . CreateStatsWithPassFails ( 0 , 5 ) , 'step2' : uu . CreateStatsWithPassFails ( 0 , 6 ) , } ) , } ) , } ) , 'bar' : data_types . ExpectationBuilderMap ( { data_types . Expectation ( 'bar' , [ 'win' ] , [ 'Failure' ] ) : data_types . BuilderStepMap ( { 'foo_builder' : data_types . StepBuildStatsMap ( { 'step1' : uu . CreateStatsWithPassFails ( 0 , 7 ) , } ) , } ) , } ) , } ) expected_active_dict = copy . deepcopy ( expectation_map ) stale_dict , semi_stale_dict , active_dict = expectation_map . SplitByStaleness ( ) self . assertEqual ( stale_dict , { } ) self . assertEqual ( semi_stale_dict , { } ) self . assertEqual ( active_dict , expected_active_dict )
Tests output when only active expectations are provided.
Tests output when only active expectations are provided .
"""Tests output when only active expectations are provided."""
self