1
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module telemetry.story.shared_state</title>
4<meta charset="utf-8">
5</head><body bgcolor="#f0f0f8">
6
7<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
8<tr bgcolor="#7799ee">
9<td valign=bottom>&nbsp;<br>
10<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.story.html"><font color="#ffffff">story</font></a>.shared_state</strong></big></big></font></td
11><td align=right valign=bottom
12><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/story/shared_state.py">telemetry/story/shared_state.py</a></font></td></tr></table>
13    <p><tt>#&nbsp;Copyright&nbsp;2014&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
14#&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
15#&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;file.</tt></p>
16<p>
17<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
18<tr bgcolor="#ee77aa">
19<td colspan=3 valign=bottom>&nbsp;<br>
20<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
21
22<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
23<td width="100%"><dl>
24<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
25</font></dt><dd>
26<dl>
27<dt><font face="helvetica, arial"><a href="telemetry.story.shared_state.html#SharedState">SharedState</a>
28</font></dt></dl>
29</dd>
30</dl>
31 <p>
32<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
33<tr bgcolor="#ffc8d8">
34<td colspan=3 valign=bottom>&nbsp;<br>
35<font color="#000000" face="helvetica, arial"><a name="SharedState">class <strong>SharedState</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
36
37<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
38<td colspan=2><tt>A&nbsp;class&nbsp;that&nbsp;manages&nbsp;the&nbsp;test&nbsp;state&nbsp;across&nbsp;multiple&nbsp;stories.<br>
39It's&nbsp;styled&nbsp;on&nbsp;unittest.TestCase&nbsp;for&nbsp;handling&nbsp;test&nbsp;setup&nbsp;&amp;&nbsp;teardown&nbsp;logic.<br>&nbsp;</tt></td></tr>
40<tr><td>&nbsp;</td>
41<td width="100%">Methods defined here:<br>
42<dl><dt><a name="SharedState-CanRunStory"><strong>CanRunStory</strong></a>(self, story)</dt><dd><tt>Indicate&nbsp;whether&nbsp;the&nbsp;story&nbsp;can&nbsp;be&nbsp;run&nbsp;in&nbsp;the&nbsp;current&nbsp;configuration.<br>
43This&nbsp;is&nbsp;called&nbsp;after&nbsp;WillRunStory&nbsp;and&nbsp;before&nbsp;RunStory.&nbsp;Return&nbsp;True<br>
44if&nbsp;the&nbsp;story&nbsp;should&nbsp;be&nbsp;run,&nbsp;and&nbsp;False&nbsp;if&nbsp;it&nbsp;should&nbsp;be&nbsp;skipped.<br>
45Most&nbsp;subclasses&nbsp;will&nbsp;probably&nbsp;want&nbsp;to&nbsp;override&nbsp;this&nbsp;to&nbsp;always<br>
46return&nbsp;True.<br>
47Args:<br>
48&nbsp;&nbsp;story:&nbsp;a&nbsp;story.Story&nbsp;instance.</tt></dd></dl>
49
50<dl><dt><a name="SharedState-DidRunStory"><strong>DidRunStory</strong></a>(self, results)</dt><dd><tt>Override&nbsp;to&nbsp;do&nbsp;any&nbsp;action&nbsp;after&nbsp;running&nbsp;each&nbsp;of&nbsp;all&nbsp;stories&nbsp;that<br>
51share&nbsp;this&nbsp;same&nbsp;state.<br>
52This&nbsp;method&nbsp;is&nbsp;styled&nbsp;on&nbsp;unittest.TestCase.tearDown.</tt></dd></dl>
53
54<dl><dt><a name="SharedState-RunStory"><strong>RunStory</strong></a>(self, results)</dt><dd><tt>Override&nbsp;to&nbsp;do&nbsp;any&nbsp;action&nbsp;before&nbsp;running&nbsp;each&nbsp;one&nbsp;of&nbsp;all&nbsp;stories<br>
55that&nbsp;share&nbsp;this&nbsp;same&nbsp;state.<br>
56This&nbsp;method&nbsp;is&nbsp;styled&nbsp;on&nbsp;unittest.TestCase.run.</tt></dd></dl>
57
58<dl><dt><a name="SharedState-TearDownState"><strong>TearDownState</strong></a>(self)</dt><dd><tt>Override&nbsp;to&nbsp;do&nbsp;any&nbsp;action&nbsp;after&nbsp;running&nbsp;multiple&nbsp;stories&nbsp;that<br>
59share&nbsp;this&nbsp;same&nbsp;state.<br>
60This&nbsp;method&nbsp;is&nbsp;styled&nbsp;on&nbsp;unittest.TestCase.tearDownClass.</tt></dd></dl>
61
62<dl><dt><a name="SharedState-WillRunStory"><strong>WillRunStory</strong></a>(self, story)</dt><dd><tt>Override&nbsp;to&nbsp;do&nbsp;any&nbsp;action&nbsp;before&nbsp;running&nbsp;each&nbsp;one&nbsp;of&nbsp;all&nbsp;stories<br>
63that&nbsp;share&nbsp;this&nbsp;same&nbsp;state.<br>
64This&nbsp;method&nbsp;is&nbsp;styled&nbsp;on&nbsp;unittest.TestCase.setUp.</tt></dd></dl>
65
66<dl><dt><a name="SharedState-__init__"><strong>__init__</strong></a>(self, test, options, story_set)</dt><dd><tt>This&nbsp;method&nbsp;is&nbsp;styled&nbsp;on&nbsp;unittest.TestCase.setUpClass.<br>
67Override&nbsp;to&nbsp;do&nbsp;any&nbsp;action&nbsp;before&nbsp;running&nbsp;stories&nbsp;that<br>
68share&nbsp;this&nbsp;same&nbsp;state.<br>
69Args:<br>
70&nbsp;&nbsp;test:&nbsp;a&nbsp;page_test.PageTest&nbsp;or&nbsp;story_test.StoryTest&nbsp;instance.<br>
71&nbsp;&nbsp;options:&nbsp;a&nbsp;BrowserFinderOptions&nbsp;instance&nbsp;that&nbsp;contains&nbsp;command&nbsp;line<br>
72&nbsp;&nbsp;&nbsp;&nbsp;options.<br>
73&nbsp;&nbsp;story_set:&nbsp;a&nbsp;story.StorySet&nbsp;instance.</tt></dd></dl>
74
75<hr>
76Data descriptors defined here:<br>
77<dl><dt><strong>__dict__</strong></dt>
78<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
79</dl>
80<dl><dt><strong>__weakref__</strong></dt>
81<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
82</dl>
83<dl><dt><strong>platform</strong></dt>
84<dd><tt>Override&nbsp;to&nbsp;return&nbsp;the&nbsp;platform&nbsp;which&nbsp;stories&nbsp;that&nbsp;share&nbsp;this&nbsp;same<br>
85state&nbsp;will&nbsp;be&nbsp;run&nbsp;on.</tt></dd>
86</dl>
87</td></tr></table></td></tr></table>
88</body></html>