tools/mac/power/collapse_profile_test.py
def testSingleSyntheticMarker(self):
    """Tests that when a single frame of interest is found the appropriate
    synthetic frame is added to the bottom of the stack."""

    samples = [{'frames': ['foo', 'bar', 'baz'], 'weight': 24}]

    # Stack will be augmented with mojo marker
    augmented_stack = samples.copy()
    augmented_stack[0]["frames"] = ['viz::'] + augmented_stack[0]["frames"]

    stack_collapser = StackCollapser('./samples.collapsed')
    stack_collapser.set_samples_for_testing(samples)
    stack_collapser.post_process_samples()
    self.assertEquals(augmented_stack, stack_collapser.samples)
Tests that when a single frame of interest is found the appropriate
    synthetic frame is added to the bottom of the stack.
Tests that when a single frame of interest is found the appropriate
synthetic frame is added to the bottom of the stack.
Tests that when a single frame of interest is found the appropriate synthetic frame is added to the bottom of the stack .
def testSingleSyntheticMarker(self):
    samples = [{'frames': ['foo', 'bar', 'baz'], 'weight': 24}]
    augmented_stack = samples.copy()
    augmented_stack[0]["frames"] = ['viz::'] + augmented_stack[0]["frames"]
    stack_collapser = StackCollapser('./samples.collapsed')
    stack_collapser.set_samples_for_testing(samples)
    stack_collapser.post_process_samples()
    self.assertEquals(augmented_stack, stack_collapser.samples)
def testSingleSyntheticMarker ( self ) : samples = [ { 'frames' : [ 'foo' , 'bar' , 'baz' ] , 'weight' : 24 } ] augmented_stack = samples . copy ( ) augmented_stack [ 0 ] [ "frames" ] = [ 'viz::' ] + augmented_stack [ 0 ] [ "frames" ] stack_collapser = StackCollapser ( './samples.collapsed' ) stack_collapser . set_samples_for_testing ( samples ) stack_collapser . post_process_samples ( ) self . assertEquals ( augmented_stack , stack_collapser . samples )
Tests that when a single frame of interest is found the appropriate
synthetic frame is added to the bottom of the stack.
Tests that when a single frame of interest is found the appropriate synthetic frame is added to the bottom of the stack .
"""Tests that when a single frame of interest is found the appropriate
    synthetic frame is added to the bottom of the stack.""" # Stack will be augmented with mojo marker
self