tools/mac/power/collapse_profile_test.py
def testDoublePostProcessFails(self):
    """Tests that calling post_process_samples() twice triggers a failure."""

    samples = [{'frames': ['foo', 'bar', 'baz'], 'weight': 24}]
    stack_collapser = StackCollapser('./samples.collapsed')
    stack_collapser.set_samples_for_testing(samples)

    with self.assertRaises(SystemExit):
      stack_collapser.post_process_samples()
      stack_collapser.post_process_samples()
Tests that calling post_process_samples() twice triggers a failure.
Tests that calling post_process_samples() twice triggers a failure.
Tests that calling post_process_samples () twice triggers a failure .
def testDoublePostProcessFails(self):
    samples = [{'frames': ['foo', 'bar', 'baz'], 'weight': 24}]
    stack_collapser = StackCollapser('./samples.collapsed')
    stack_collapser.set_samples_for_testing(samples)
    with self.assertRaises(SystemExit):
      stack_collapser.post_process_samples()
      stack_collapser.post_process_samples()
def testDoublePostProcessFails ( self ) : samples = [ { 'frames' : [ 'foo' , 'bar' , 'baz' ] , 'weight' : 24 } ] stack_collapser = StackCollapser ( './samples.collapsed' ) stack_collapser . set_samples_for_testing ( samples ) with self . assertRaises ( SystemExit ) : stack_collapser . post_process_samples ( ) stack_collapser . post_process_samples ( )
Tests that calling post_process_samples() twice triggers a failure.
Tests that calling post_process_samples () twice triggers a failure .
"""Tests that calling post_process_samples() twice triggers a failure."""
self