telemetry.story.shared_state | index telemetry/story/shared_state.py

`# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.`

Classes
`` |  |

__builtin__.object
  SharedState

class SharedState(__builtin__.object)
`` | `A class that manages the test state across multiple stories. It's styled on unittest.TestCase for handling test setup & teardown logic.`
| Methods defined here:

CanRunStory(self, story)
  `Indicate whether the story can be run in the current configuration.
  This is called after WillRunStory and before RunStory. Return True
  if the story should be run, and False if it should be skipped.
  Most subclasses will probably want to override this to always
  return True.
  Args:
  story: a story.Story instance.`

DidRunStory(self, results)
  `Override to do any action after running each of all stories that
  share this same state.
  This method is styled on unittest.TestCase.tearDown.`

RunStory(self, results)
  `Override to do any action before running each one of all stories
  that share this same state.
  This method is styled on unittest.TestCase.run.`

TearDownState(self)
  `Override to do any action after running multiple stories that
  share this same state.
  This method is styled on unittest.TestCase.tearDownClass.`

WillRunStory(self, story)
  `Override to do any action before running each one of all stories
  that share this same state.
  This method is styled on unittest.TestCase.setUp.`

__init__(self, test, options, story_set)
  `This method is styled on unittest.TestCase.setUpClass.
  Override to do any action before running stories that
  share this same state.
  Args:
  test: a page_test.PageTest or story_test.StoryTest instance.
  options: a BrowserFinderOptions instance that contains command line
  options.
  story_set: a story.StorySet instance.`

Data descriptors defined here:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

platform
  `Override to return the platform which stories that share this same
  state will be run on.`