testing/unexpected_passes_common/result_output_unittest.py
def testBasic(self):
    """Tests that a map is properly converted."""
    builder_map = data_types.BuilderStepMap({
        'fully pass':
        data_types.StepBuildStatsMap({
            'step1': uu.CreateStatsWithPassFails(1, 0),
        }),
        'never pass':
        data_types.StepBuildStatsMap({
            'step3': uu.CreateStatsWithPassFails(0, 1),
        }),
        'partial pass':
        data_types.StepBuildStatsMap({
            'step5': uu.CreateStatsWithPassFails(1, 1),
        }),
        'mixed':
        data_types.StepBuildStatsMap({
            'step7': uu.CreateStatsWithPassFails(1, 0),
            'step8': uu.CreateStatsWithPassFails(0, 1),
            'step9': uu.CreateStatsWithPassFails(1, 1),
        }),
    })
    output = result_output.ConvertBuilderMapToPassOrderedStringDict(builder_map)

    expected_output = collections.OrderedDict()
    expected_output[result_output.FULL_PASS] = {
        'fully pass': [
            'step1 (1/1 passed)',
        ],
        'mixed': [
            'step7 (1/1 passed)',
        ],
    }
    expected_output[result_output.NEVER_PASS] = {
        'never pass': [
            'step3 (0/1 passed)',
        ],
        'mixed': [
            'step8 (0/1 passed)',
        ],
    }
    expected_output[result_output.PARTIAL_PASS] = {
        'partial pass': {
            'step5 (1/2 passed)': [
                'http://ci.chromium.org/b/build_id0',
            ],
        },
        'mixed': {
            'step9 (1/2 passed)': [
                'http://ci.chromium.org/b/build_id0',
            ],
        },
    }
    self.assertEqual(output, expected_output)
Tests that a map is properly converted.
Tests that a map is properly converted.
Tests that a map is properly converted .
def testBasic(self):
    builder_map = data_types.BuilderStepMap({
        'fully pass':
        data_types.StepBuildStatsMap({
            'step1': uu.CreateStatsWithPassFails(1, 0),
        }),
        'never pass':
        data_types.StepBuildStatsMap({
            'step3': uu.CreateStatsWithPassFails(0, 1),
        }),
        'partial pass':
        data_types.StepBuildStatsMap({
            'step5': uu.CreateStatsWithPassFails(1, 1),
        }),
        'mixed':
        data_types.StepBuildStatsMap({
            'step7': uu.CreateStatsWithPassFails(1, 0),
            'step8': uu.CreateStatsWithPassFails(0, 1),
            'step9': uu.CreateStatsWithPassFails(1, 1),
        }),
    })
    output = result_output.ConvertBuilderMapToPassOrderedStringDict(builder_map)
    expected_output = collections.OrderedDict()
    expected_output[result_output.FULL_PASS] = {
        'fully pass': [
            'step1 (1/1 passed)',
        ],
        'mixed': [
            'step7 (1/1 passed)',
        ],
    }
    expected_output[result_output.NEVER_PASS] = {
        'never pass': [
            'step3 (0/1 passed)',
        ],
        'mixed': [
            'step8 (0/1 passed)',
        ],
    }
    expected_output[result_output.PARTIAL_PASS] = {
        'partial pass': {
            'step5 (1/2 passed)': [
                'http://ci.chromium.org/b/build_id0',
            ],
        },
        'mixed': {
            'step9 (1/2 passed)': [
                'http://ci.chromium.org/b/build_id0',
            ],
        },
    }
    self.assertEqual(output, expected_output)
def testBasic ( self ) : builder_map = data_types . BuilderStepMap ( { 'fully pass' : data_types . StepBuildStatsMap ( { 'step1' : uu . CreateStatsWithPassFails ( 1 , 0 ) , } ) , 'never pass' : data_types . StepBuildStatsMap ( { 'step3' : uu . CreateStatsWithPassFails ( 0 , 1 ) , } ) , 'partial pass' : data_types . StepBuildStatsMap ( { 'step5' : uu . CreateStatsWithPassFails ( 1 , 1 ) , } ) , 'mixed' : data_types . StepBuildStatsMap ( { 'step7' : uu . CreateStatsWithPassFails ( 1 , 0 ) , 'step8' : uu . CreateStatsWithPassFails ( 0 , 1 ) , 'step9' : uu . CreateStatsWithPassFails ( 1 , 1 ) , } ) , } ) output = result_output . ConvertBuilderMapToPassOrderedStringDict ( builder_map ) expected_output = collections . OrderedDict ( ) expected_output [ result_output . FULL_PASS ] = { 'fully pass' : [ 'step1 (1/1 passed)' , ] , 'mixed' : [ 'step7 (1/1 passed)' , ] , } expected_output [ result_output . NEVER_PASS ] = { 'never pass' : [ 'step3 (0/1 passed)' , ] , 'mixed' : [ 'step8 (0/1 passed)' , ] , } expected_output [ result_output . PARTIAL_PASS ] = { 'partial pass' : { 'step5 (1/2 passed)' : [ 'http://ci.chromium.org/b/build_id0' , ] , } , 'mixed' : { 'step9 (1/2 passed)' : [ 'http://ci.chromium.org/b/build_id0' , ] , } , } self . assertEqual ( output , expected_output )
Tests that a map is properly converted.
Tests that a map is properly converted .
"""Tests that a map is properly converted."""
self