tools/mac/power/collapse_profile_test.py
def testCutoffPointPreserved(self):
    """Tests that shortening a stack is inclusive of the cutoff point."""

    samples = [{
        'frames':
        ['foo', 'bar', 'baz', 'base::MessagePumpNSRunLoop::DoRun', "biz"],
        'weight':
        24
    }]
    shortened_stack = [{
        'frames': ['base::MessagePumpNSRunLoop::DoRun', "biz"],
        'weight': 24
    }]

    stack_collapser = StackCollapser('./samples.collapsed')
    stack_collapser.set_samples_for_testing(samples)
    stack_collapser.post_process_samples()
    self.assertEquals(shortened_stack, stack_collapser.samples)
Tests that shortening a stack is inclusive of the cutoff point.
Tests that shortening a stack is inclusive of the cutoff point.
Tests that shortening a stack is inclusive of the cutoff point .
def testCutoffPointPreserved(self):
    samples = [{
        'frames':
        ['foo', 'bar', 'baz', 'base::MessagePumpNSRunLoop::DoRun', "biz"],
        'weight':
        24
    }]
    shortened_stack = [{
        'frames': ['base::MessagePumpNSRunLoop::DoRun', "biz"],
        'weight': 24
    }]
    stack_collapser = StackCollapser('./samples.collapsed')
    stack_collapser.set_samples_for_testing(samples)
    stack_collapser.post_process_samples()
    self.assertEquals(shortened_stack, stack_collapser.samples)
def testCutoffPointPreserved ( self ) : samples = [ { 'frames' : [ 'foo' , 'bar' , 'baz' , 'base::MessagePumpNSRunLoop::DoRun' , "biz" ] , 'weight' : 24 } ] shortened_stack = [ { 'frames' : [ 'base::MessagePumpNSRunLoop::DoRun' , "biz" ] , 'weight' : 24 } ] stack_collapser = StackCollapser ( './samples.collapsed' ) stack_collapser . set_samples_for_testing ( samples ) stack_collapser . post_process_samples ( ) self . assertEquals ( shortened_stack , stack_collapser . samples )
Tests that shortening a stack is inclusive of the cutoff point.
Tests that shortening a stack is inclusive of the cutoff point .
"""Tests that shortening a stack is inclusive of the cutoff point."""
self