testing/unexpected_passes_common/result_output_unittest.py
def testOutputResultsSmoketest(self):
    """Test that nothing blows up when outputting."""
    expectation_map = data_types.TestExpectationMap({
        'foo':
        data_types.ExpectationBuilderMap({
            data_types.Expectation('foo', ['win', 'intel'], 'RetryOnFailure'):
            data_types.BuilderStepMap({
                'stale':
                data_types.StepBuildStatsMap({
                    'all_pass':
                    uu.CreateStatsWithPassFails(2, 0),
                }),
            }),
            data_types.Expectation('foo', ['linux'], 'Failure'):
            data_types.BuilderStepMap({
                'semi_stale':
                data_types.StepBuildStatsMap({
                    'all_pass':
                    uu.CreateStatsWithPassFails(2, 0),
                    'some_pass':
                    uu.CreateStatsWithPassFails(1, 1),
                    'none_pass':
                    uu.CreateStatsWithPassFails(0, 2),
                }),
            }),
            data_types.Expectation('foo', ['mac'], 'Failure'):
            data_types.BuilderStepMap({
                'active':
                data_types.StepBuildStatsMap({
                    'none_pass':
                    uu.CreateStatsWithPassFails(0, 2),
                }),
            }),
        }),
    })
    unmatched_results = {
        'builder': [
            data_types.Result('foo', ['win', 'intel'], 'Failure', 'step_name',
                              'build_id'),
        ],
    }
    unmatched_expectations = {
        'foo_file': [
            data_types.Expectation('foo', ['linux'], 'RetryOnFailure'),
        ],
    }

    stale, semi_stale, active = expectation_map.SplitByStaleness()

    result_output.OutputResults(stale, semi_stale, active, {}, {}, 'print',
                                self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, unmatched_results,
                                {}, 'print', self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, {},
                                unmatched_expectations, 'print',
                                self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, unmatched_results,
                                unmatched_expectations, 'print',
                                self._file_handle)

    result_output.OutputResults(stale, semi_stale, active, {}, {}, 'html',
                                self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, unmatched_results,
                                {}, 'html', self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, {},
                                unmatched_expectations, 'html',
                                self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, unmatched_results,
                                unmatched_expectations, 'html',
                                self._file_handle)
Test that nothing blows up when outputting.
Test that nothing blows up when outputting.
Test that nothing blows up when outputting .
def testOutputResultsSmoketest(self):
    expectation_map = data_types.TestExpectationMap({
        'foo':
        data_types.ExpectationBuilderMap({
            data_types.Expectation('foo', ['win', 'intel'], 'RetryOnFailure'):
            data_types.BuilderStepMap({
                'stale':
                data_types.StepBuildStatsMap({
                    'all_pass':
                    uu.CreateStatsWithPassFails(2, 0),
                }),
            }),
            data_types.Expectation('foo', ['linux'], 'Failure'):
            data_types.BuilderStepMap({
                'semi_stale':
                data_types.StepBuildStatsMap({
                    'all_pass':
                    uu.CreateStatsWithPassFails(2, 0),
                    'some_pass':
                    uu.CreateStatsWithPassFails(1, 1),
                    'none_pass':
                    uu.CreateStatsWithPassFails(0, 2),
                }),
            }),
            data_types.Expectation('foo', ['mac'], 'Failure'):
            data_types.BuilderStepMap({
                'active':
                data_types.StepBuildStatsMap({
                    'none_pass':
                    uu.CreateStatsWithPassFails(0, 2),
                }),
            }),
        }),
    })
    unmatched_results = {
        'builder': [
            data_types.Result('foo', ['win', 'intel'], 'Failure', 'step_name',
                              'build_id'),
        ],
    }
    unmatched_expectations = {
        'foo_file': [
            data_types.Expectation('foo', ['linux'], 'RetryOnFailure'),
        ],
    }
    stale, semi_stale, active = expectation_map.SplitByStaleness()
    result_output.OutputResults(stale, semi_stale, active, {}, {}, 'print',
                                self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, unmatched_results,
                                {}, 'print', self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, {},
                                unmatched_expectations, 'print',
                                self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, unmatched_results,
                                unmatched_expectations, 'print',
                                self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, {}, {}, 'html',
                                self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, unmatched_results,
                                {}, 'html', self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, {},
                                unmatched_expectations, 'html',
                                self._file_handle)
    result_output.OutputResults(stale, semi_stale, active, unmatched_results,
                                unmatched_expectations, 'html',
                                self._file_handle)
def testOutputResultsSmoketest ( self ) : expectation_map = data_types . TestExpectationMap ( { 'foo' : data_types . ExpectationBuilderMap ( { data_types . Expectation ( 'foo' , [ 'win' , 'intel' ] , 'RetryOnFailure' ) : data_types . BuilderStepMap ( { 'stale' : data_types . StepBuildStatsMap ( { 'all_pass' : uu . CreateStatsWithPassFails ( 2 , 0 ) , } ) , } ) , data_types . Expectation ( 'foo' , [ 'linux' ] , 'Failure' ) : data_types . BuilderStepMap ( { 'semi_stale' : data_types . StepBuildStatsMap ( { 'all_pass' : uu . CreateStatsWithPassFails ( 2 , 0 ) , 'some_pass' : uu . CreateStatsWithPassFails ( 1 , 1 ) , 'none_pass' : uu . CreateStatsWithPassFails ( 0 , 2 ) , } ) , } ) , data_types . Expectation ( 'foo' , [ 'mac' ] , 'Failure' ) : data_types . BuilderStepMap ( { 'active' : data_types . StepBuildStatsMap ( { 'none_pass' : uu . CreateStatsWithPassFails ( 0 , 2 ) , } ) , } ) , } ) , } ) unmatched_results = { 'builder' : [ data_types . Result ( 'foo' , [ 'win' , 'intel' ] , 'Failure' , 'step_name' , 'build_id' ) , ] , } unmatched_expectations = { 'foo_file' : [ data_types . Expectation ( 'foo' , [ 'linux' ] , 'RetryOnFailure' ) , ] , } stale , semi_stale , active = expectation_map . SplitByStaleness ( ) result_output . OutputResults ( stale , semi_stale , active , { } , { } , 'print' , self . _file_handle ) result_output . OutputResults ( stale , semi_stale , active , unmatched_results , { } , 'print' , self . _file_handle ) result_output . OutputResults ( stale , semi_stale , active , { } , unmatched_expectations , 'print' , self . _file_handle ) result_output . OutputResults ( stale , semi_stale , active , unmatched_results , unmatched_expectations , 'print' , self . _file_handle ) result_output . OutputResults ( stale , semi_stale , active , { } , { } , 'html' , self . _file_handle ) result_output . OutputResults ( stale , semi_stale , active , unmatched_results , { } , 'html' , self . _file_handle ) result_output . OutputResults ( stale , semi_stale , active , { } , unmatched_expectations , 'html' , self . _file_handle ) result_output . OutputResults ( stale , semi_stale , active , unmatched_results , unmatched_expectations , 'html' , self . _file_handle )
Test that nothing blows up when outputting.
Test that nothing blows up when outputting .
"""Test that nothing blows up when outputting."""
self