OLD | NEW |
| (Empty) |
1 | |
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |
3 <html><head><title>Python: module telemetry.internal.backends.chrome.cros_test_c
ase</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> <br> | |
10 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a hre
f="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry
.internal.html"><font color="#ffffff">internal</font></a>.<a href="telemetry.int
ernal.backends.html"><font color="#ffffff">backends</font></a>.<a href="telemetr
y.internal.backends.chrome.html"><font color="#ffffff">chrome</font></a>.cros_te
st_case</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/internal/backends/chrome/cros_test_case.py">telemetry/internal/bac
kends/chrome/cros_test_case.py</a></font></td></tr></table> | |
13 <p><tt># Copyright 2014 The Chromium Authors.
All rights reserved.<br> | |
14 # Use of this source code is governed by
a BSD-style license that can be<br> | |
15 # found in the LICENSE file.</tt></p> | |
16 <p> | |
17 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
18 <tr bgcolor="#aa55cc"> | |
19 <td colspan=3 valign=bottom> <br> | |
20 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big
></font></td></tr> | |
21 | |
22 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td>
</td> | |
23 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=t
op><a href="telemetry.internal.browser.browser_finder.html">telemetry.internal.b
rowser.browser_finder</a><br> | |
24 <a href="telemetry.core.cros_interface.html">telemetry.core.cros_interface</a><b
r> | |
25 </td><td width="25%" valign=top><a href="telemetry.internal.browser.extension_to
_load.html">telemetry.internal.browser.extension_to_load</a><br> | |
26 <a href="telemetry.testing.options_for_unittests.html">telemetry.testing.options
_for_unittests</a><br> | |
27 </td><td width="25%" valign=top><a href="os.html">os</a><br> | |
28 <a href="unittest.html">unittest</a><br> | |
29 </td><td width="25%" valign=top><a href="telemetry.core.util.html">telemetry.cor
e.util</a><br> | |
30 </td></tr></table></td></tr></table><p> | |
31 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
32 <tr bgcolor="#ee77aa"> | |
33 <td colspan=3 valign=bottom> <br> | |
34 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big
></font></td></tr> | |
35 | |
36 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td>
</td> | |
37 <td width="100%"><dl> | |
38 <dt><font face="helvetica, arial"><a href="unittest.case.html#TestCase">unittest
.case.TestCase</a>(<a href="__builtin__.html#object">__builtin__.object</a>) | |
39 </font></dt><dd> | |
40 <dl> | |
41 <dt><font face="helvetica, arial"><a href="telemetry.internal.backends.chrome.cr
os_test_case.html#CrOSTestCase">CrOSTestCase</a> | |
42 </font></dt></dl> | |
43 </dd> | |
44 </dl> | |
45 <p> | |
46 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
47 <tr bgcolor="#ffc8d8"> | |
48 <td colspan=3 valign=bottom> <br> | |
49 <font color="#000000" face="helvetica, arial"><a name="CrOSTestCase">class <stro
ng>CrOSTestCase</strong></a>(<a href="unittest.case.html#TestCase">unittest.case
.TestCase</a>)</font></td></tr> | |
50 | |
51 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> | |
52 <td width="100%"><dl><dt>Method resolution order:</dt> | |
53 <dd><a href="telemetry.internal.backends.chrome.cros_test_case.html#CrOSTestCase
">CrOSTestCase</a></dd> | |
54 <dd><a href="unittest.case.html#TestCase">unittest.case.TestCase</a></dd> | |
55 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> | |
56 </dl> | |
57 <hr> | |
58 Methods defined here:<br> | |
59 <dl><dt><a name="CrOSTestCase-setUp"><strong>setUp</strong></a>(self)</dt></dl> | |
60 | |
61 <hr> | |
62 Methods inherited from <a href="unittest.case.html#TestCase">unittest.case.TestC
ase</a>:<br> | |
63 <dl><dt><a name="CrOSTestCase-__call__"><strong>__call__</strong></a>(self, *arg
s, **kwds)</dt></dl> | |
64 | |
65 <dl><dt><a name="CrOSTestCase-__eq__"><strong>__eq__</strong></a>(self, other)</
dt></dl> | |
66 | |
67 <dl><dt><a name="CrOSTestCase-__hash__"><strong>__hash__</strong></a>(self)</dt>
</dl> | |
68 | |
69 <dl><dt><a name="CrOSTestCase-__init__"><strong>__init__</strong></a>(self, meth
odName<font color="#909090">='runTest'</font>)</dt><dd><tt>Create an i
nstance of the class that will use the n
amed test<br> | |
70 method when executed. Raises a ValueError if
the instance does<br> | |
71 not have a method with the specified name.</t
t></dd></dl> | |
72 | |
73 <dl><dt><a name="CrOSTestCase-__ne__"><strong>__ne__</strong></a>(self, other)</
dt></dl> | |
74 | |
75 <dl><dt><a name="CrOSTestCase-__repr__"><strong>__repr__</strong></a>(self)</dt>
</dl> | |
76 | |
77 <dl><dt><a name="CrOSTestCase-__str__"><strong>__str__</strong></a>(self)</dt></
dl> | |
78 | |
79 <dl><dt><a name="CrOSTestCase-addCleanup"><strong>addCleanup</strong></a>(self,
function, *args, **kwargs)</dt><dd><tt>Add a function, with
arguments, to be called when the test is<br> | |
80 completed. Functions added are called on a LI
FO basis and are<br> | |
81 called after tearDown on test failure or succ
ess.<br> | |
82 <br> | |
83 Cleanup items are called even if setUp fails&
nbsp;(unlike tearDown).</tt></dd></dl> | |
84 | |
85 <dl><dt><a name="CrOSTestCase-addTypeEqualityFunc"><strong>addTypeEqualityFunc</
strong></a>(self, typeobj, function)</dt><dd><tt>Add a type speci
fic assertEqual style function to compare a t
ype.<br> | |
86 <br> | |
87 This method is for use by <a href="unittest.case.h
tml#TestCase">TestCase</a> subclasses that need to regi
ster<br> | |
88 their own type equality functions to provide
nicer error messages.<br> | |
89 <br> | |
90 Args:<br> | |
91 typeobj: The data type to call&
nbsp;this function on when both values<br> | |
92 are 
;of the same type in <a href="#CrOSTestCase-assertEqual
">assertEqual</a>().<br> | |
93 function: The callable taking two&nb
sp;arguments and an optional<br> | |
94 msg=&nbs
p;argument that raises self.<strong>failureException</strong>&nbs
p;with a<br> | |
95 useful&n
bsp;error message when the two arguments are
not equal.</tt></dd></dl> | |
96 | |
97 <dl><dt><a name="CrOSTestCase-assertAlmostEqual"><strong>assertAlmostEqual</stro
ng></a>(self, first, second, places<font color="#909090">=None</font>, msg<font
color="#909090">=None</font>, delta<font color="#909090">=None</font>)</dt><dd><
tt>Fail if the two objects are unequal as&nbs
p;determined by their<br> | |
98 difference rounded to the given number of dec
imal places<br> | |
99 (default 7) and comparing to zero, or by 
;comparing that the<br> | |
100 between the two objects is more than the 
;given delta.<br> | |
101 <br> | |
102 Note that decimal places (from zero) are usua
lly not the same<br> | |
103 as significant digits (measured from the most 
;signficant digit).<br> | |
104 <br> | |
105 If the two objects compare equal then they&nb
sp;will automatically<br> | |
106 compare almost equal.</tt></dd></dl> | |
107 | |
108 <dl><dt><a name="CrOSTestCase-assertAlmostEquals"><strong>assertAlmostEquals</st
rong></a> = assertAlmostEqual(self, first, second, places<font color="#909090">=
None</font>, msg<font color="#909090">=None</font>, delta<font color="#909090">=
None</font>)</dt><dd><tt>Fail if the two objects are&nb
sp;unequal as determined by their<br> | |
109 difference rounded to the given number of dec
imal places<br> | |
110 (default 7) and comparing to zero, or by 
;comparing that the<br> | |
111 between the two objects is more than the 
;given delta.<br> | |
112 <br> | |
113 Note that decimal places (from zero) are usua
lly not the same<br> | |
114 as significant digits (measured from the most 
;signficant digit).<br> | |
115 <br> | |
116 If the two objects compare equal then they&nb
sp;will automatically<br> | |
117 compare almost equal.</tt></dd></dl> | |
118 | |
119 <dl><dt><a name="CrOSTestCase-assertDictContainsSubset"><strong>assertDictContai
nsSubset</strong></a>(self, expected, actual, msg<font color="#909090">=None</fo
nt>)</dt><dd><tt>Checks whether actual is a superset&nb
sp;of expected.</tt></dd></dl> | |
120 | |
121 <dl><dt><a name="CrOSTestCase-assertDictEqual"><strong>assertDictEqual</strong><
/a>(self, d1, d2, msg<font color="#909090">=None</font>)</dt></dl> | |
122 | |
123 <dl><dt><a name="CrOSTestCase-assertEqual"><strong>assertEqual</strong></a>(self
, first, second, msg<font color="#909090">=None</font>)</dt><dd><tt>Fail if
the two objects are unequal as determined&nb
sp;by the '=='<br> | |
124 operator.</tt></dd></dl> | |
125 | |
126 <dl><dt><a name="CrOSTestCase-assertEquals"><strong>assertEquals</strong></a> =
assertEqual(self, first, second, msg<font color="#909090">=None</font>)</dt><dd>
<tt>Fail if the two objects are unequal as&nb
sp;determined by the '=='<br> | |
127 operator.</tt></dd></dl> | |
128 | |
129 <dl><dt><a name="CrOSTestCase-assertFalse"><strong>assertFalse</strong></a>(self
, expr, msg<font color="#909090">=None</font>)</dt><dd><tt>Check that
the expression is false.</tt></dd></dl> | |
130 | |
131 <dl><dt><a name="CrOSTestCase-assertGreater"><strong>assertGreater</strong></a>(
self, a, b, msg<font color="#909090">=None</font>)</dt><dd><tt>Just like&nb
sp;<a href="#CrOSTestCase-assertTrue">assertTrue</a>(a > b), b
ut with a nicer default message.</tt></dd></dl> | |
132 | |
133 <dl><dt><a name="CrOSTestCase-assertGreaterEqual"><strong>assertGreaterEqual</st
rong></a>(self, a, b, msg<font color="#909090">=None</font>)</dt><dd><tt>Just&nb
sp;like <a href="#CrOSTestCase-assertTrue">assertTrue</a>(a >= 
;b), but with a nicer default message.</tt></dd></
dl> | |
134 | |
135 <dl><dt><a name="CrOSTestCase-assertIn"><strong>assertIn</strong></a>(self, memb
er, container, msg<font color="#909090">=None</font>)</dt><dd><tt>Just like
<a href="#CrOSTestCase-assertTrue">assertTrue</a>(a in b),
but with a nicer default message.</tt></dd></dl> | |
136 | |
137 <dl><dt><a name="CrOSTestCase-assertIs"><strong>assertIs</strong></a>(self, expr
1, expr2, msg<font color="#909090">=None</font>)</dt><dd><tt>Just like 
;<a href="#CrOSTestCase-assertTrue">assertTrue</a>(a is b), but&n
bsp;with a nicer default message.</tt></dd></dl> | |
138 | |
139 <dl><dt><a name="CrOSTestCase-assertIsInstance"><strong>assertIsInstance</strong
></a>(self, obj, cls, msg<font color="#909090">=None</font>)</dt><dd><tt>Same&nb
sp;as <a href="#CrOSTestCase-assertTrue">assertTrue</a>(isinstance(obj,&nbs
p;cls)), with a nicer<br> | |
140 default message.</tt></dd></dl> | |
141 | |
142 <dl><dt><a name="CrOSTestCase-assertIsNone"><strong>assertIsNone</strong></a>(se
lf, obj, msg<font color="#909090">=None</font>)</dt><dd><tt>Same as <a
href="#CrOSTestCase-assertTrue">assertTrue</a>(obj is None), wit
h a nicer default message.</tt></dd></dl> | |
143 | |
144 <dl><dt><a name="CrOSTestCase-assertIsNot"><strong>assertIsNot</strong></a>(self
, expr1, expr2, msg<font color="#909090">=None</font>)</dt><dd><tt>Just lik
e <a href="#CrOSTestCase-assertTrue">assertTrue</a>(a is not 
;b), but with a nicer default message.</tt></dd></
dl> | |
145 | |
146 <dl><dt><a name="CrOSTestCase-assertIsNotNone"><strong>assertIsNotNone</strong><
/a>(self, obj, msg<font color="#909090">=None</font>)</dt><dd><tt>Included
for symmetry with assertIsNone.</tt></dd></dl> | |
147 | |
148 <dl><dt><a name="CrOSTestCase-assertItemsEqual"><strong>assertItemsEqual</strong
></a>(self, expected_seq, actual_seq, msg<font color="#909090">=None</font>)</dt
><dd><tt>An unordered sequence specific comparison. It&
nbsp;asserts that<br> | |
149 actual_seq and expected_seq have the same element&
nbsp;counts.<br> | |
150 Equivalent to::<br> | |
151 <br> | |
152 <a href="#CrOSTestCase-assertEqual">assertEqual</a>(Coun
ter(iter(actual_seq)),<br> | |
153 &n
bsp; Counter(iter(expected_seq)))<br> | |
154 <br> | |
155 Asserts that each element has the same count&
nbsp;in both sequences.<br> | |
156 Example:<br> | |
157 - [0, 1, 1] and [1, 0,&nbs
p;1] compare equal.<br> | |
158 - [0, 0, 1] and [0, 1]&nbs
p;compare unequal.</tt></dd></dl> | |
159 | |
160 <dl><dt><a name="CrOSTestCase-assertLess"><strong>assertLess</strong></a>(self,
a, b, msg<font color="#909090">=None</font>)</dt><dd><tt>Just like <a
href="#CrOSTestCase-assertTrue">assertTrue</a>(a < b), but&nbs
p;with a nicer default message.</tt></dd></dl> | |
161 | |
162 <dl><dt><a name="CrOSTestCase-assertLessEqual"><strong>assertLessEqual</strong><
/a>(self, a, b, msg<font color="#909090">=None</font>)</dt><dd><tt>Just lik
e <a href="#CrOSTestCase-assertTrue">assertTrue</a>(a <= b),&n
bsp;but with a nicer default message.</tt></dd></dl> | |
163 | |
164 <dl><dt><a name="CrOSTestCase-assertListEqual"><strong>assertListEqual</strong><
/a>(self, list1, list2, msg<font color="#909090">=None</font>)</dt><dd><tt>A&nbs
p;list-specific equality assertion.<br> | |
165 <br> | |
166 Args:<br> | |
167 list1: The first list to compar
e.<br> | |
168 list2: The second list to compa
re.<br> | |
169 msg: Optional message to use on
failure instead of a list of<br> | |
170 differen
ces.</tt></dd></dl> | |
171 | |
172 <dl><dt><a name="CrOSTestCase-assertMultiLineEqual"><strong>assertMultiLineEqual
</strong></a>(self, first, second, msg<font color="#909090">=None</font>)</dt><d
d><tt>Assert that two multi-line strings are equal
.</tt></dd></dl> | |
173 | |
174 <dl><dt><a name="CrOSTestCase-assertNotAlmostEqual"><strong>assertNotAlmostEqual
</strong></a>(self, first, second, places<font color="#909090">=None</font>, msg
<font color="#909090">=None</font>, delta<font color="#909090">=None</font>)</dt
><dd><tt>Fail if the two objects are equal as
determined by their<br> | |
175 difference rounded to the given number of dec
imal places<br> | |
176 (default 7) and comparing to zero, or by 
;comparing that the<br> | |
177 between the two objects is less than the 
;given delta.<br> | |
178 <br> | |
179 Note that decimal places (from zero) are usua
lly not the same<br> | |
180 as significant digits (measured from the most 
;signficant digit).<br> | |
181 <br> | |
182 Objects that are equal automatically fail.</tt></dd></d
l> | |
183 | |
184 <dl><dt><a name="CrOSTestCase-assertNotAlmostEquals"><strong>assertNotAlmostEqua
ls</strong></a> = assertNotAlmostEqual(self, first, second, places<font color="#
909090">=None</font>, msg<font color="#909090">=None</font>, delta<font color="#
909090">=None</font>)</dt><dd><tt>Fail if the two objects&nb
sp;are equal as determined by their<br> | |
185 difference rounded to the given number of dec
imal places<br> | |
186 (default 7) and comparing to zero, or by 
;comparing that the<br> | |
187 between the two objects is less than the 
;given delta.<br> | |
188 <br> | |
189 Note that decimal places (from zero) are usua
lly not the same<br> | |
190 as significant digits (measured from the most 
;signficant digit).<br> | |
191 <br> | |
192 Objects that are equal automatically fail.</tt></dd></d
l> | |
193 | |
194 <dl><dt><a name="CrOSTestCase-assertNotEqual"><strong>assertNotEqual</strong></a
>(self, first, second, msg<font color="#909090">=None</font>)</dt><dd><tt>Fail&n
bsp;if the two objects are equal as determine
d by the '!='<br> | |
195 operator.</tt></dd></dl> | |
196 | |
197 <dl><dt><a name="CrOSTestCase-assertNotEquals"><strong>assertNotEquals</strong><
/a> = assertNotEqual(self, first, second, msg<font color="#909090">=None</font>)
</dt><dd><tt>Fail if the two objects are equal&nbs
p;as determined by the '!='<br> | |
198 operator.</tt></dd></dl> | |
199 | |
200 <dl><dt><a name="CrOSTestCase-assertNotIn"><strong>assertNotIn</strong></a>(self
, member, container, msg<font color="#909090">=None</font>)</dt><dd><tt>Just&nbs
p;like <a href="#CrOSTestCase-assertTrue">assertTrue</a>(a not in
b), but with a nicer default message.</tt></
dd></dl> | |
201 | |
202 <dl><dt><a name="CrOSTestCase-assertNotIsInstance"><strong>assertNotIsInstance</
strong></a>(self, obj, cls, msg<font color="#909090">=None</font>)</dt><dd><tt>I
ncluded for symmetry with assertIsInstance.</tt></dd></dl> | |
203 | |
204 <dl><dt><a name="CrOSTestCase-assertNotRegexpMatches"><strong>assertNotRegexpMat
ches</strong></a>(self, text, unexpected_regexp, msg<font color="#909090">=None<
/font>)</dt><dd><tt>Fail the test if the text matc
hes the regular expression.</tt></dd></dl> | |
205 | |
206 <dl><dt><a name="CrOSTestCase-assertRaises"><strong>assertRaises</strong></a>(se
lf, excClass, callableObj<font color="#909090">=None</font>, *args, **kwargs)</d
t><dd><tt>Fail unless an exception of class excCla
ss is raised<br> | |
207 by callableObj when invoked with arguments args&nb
sp;and keyword<br> | |
208 arguments kwargs. If a different type of exce
ption is<br> | |
209 raised, it will not be caught, and the t
est case will be<br> | |
210 deemed to have suffered an error, exactly as&
nbsp;for an<br> | |
211 unexpected exception.<br> | |
212 <br> | |
213 If called with callableObj omitted or None, w
ill return a<br> | |
214 context object used like this::<br> | |
215 <br> | |
216 with <a href="#CrOSTestCase-assertRaises">ass
ertRaises</a>(SomeException):<br> | |
217 do_something()<br> | |
218 <br> | |
219 The context manager keeps a reference to the&
nbsp;exception as<br> | |
220 the 'exception' attribute. This allows you to 
;inspect the<br> | |
221 exception after the assertion::<br> | |
222 <br> | |
223 with <a href="#CrOSTestCase-assertRaises">assertRai
ses</a>(SomeException) as cm:<br> | |
224 do_something()<br> | |
225 the_exception = cm.exception<br> | |
226 <a href="#CrOSTestCase-assertEqual">assertEqual</a>(the_
exception.error_code, 3)</tt></dd></dl> | |
227 | |
228 <dl><dt><a name="CrOSTestCase-assertRaisesRegexp"><strong>assertRaisesRegexp</st
rong></a>(self, expected_exception, expected_regexp, callable_obj<font color="#9
09090">=None</font>, *args, **kwargs)</dt><dd><tt>Asserts that the&nbs
p;message in a raised exception matches a reg
exp.<br> | |
229 <br> | |
230 Args:<br> | |
231 expected_exception: Exception class expec
ted to be raised.<br> | |
232 expected_regexp: Regexp (re pattern
object or string) expected<br> | |
233 to
be found in error message.<br> | |
234 callable_obj: Function to be called.
<br> | |
235 args: Extra args.<br> | |
236 kwargs: Extra kwargs.</tt></dd></dl> | |
237 | |
238 <dl><dt><a name="CrOSTestCase-assertRegexpMatches"><strong>assertRegexpMatches</
strong></a>(self, text, expected_regexp, msg<font color="#909090">=None</font>)<
/dt><dd><tt>Fail the test unless the text matches&
nbsp;the regular expression.</tt></dd></dl> | |
239 | |
240 <dl><dt><a name="CrOSTestCase-assertSequenceEqual"><strong>assertSequenceEqual</
strong></a>(self, seq1, seq2, msg<font color="#909090">=None</font>, seq_type<fo
nt color="#909090">=None</font>)</dt><dd><tt>An equality assertion&nbs
p;for ordered sequences (like lists and tuples).<b
r> | |
241 <br> | |
242 For the purposes of this function, a valid&nb
sp;ordered sequence type is one<br> | |
243 which can be indexed, has a length, and
has an equality operator.<br> | |
244 <br> | |
245 Args:<br> | |
246 seq1: The first sequence to com
pare.<br> | |
247 seq2: The second sequence to co
mpare.<br> | |
248 seq_type: The expected datatype of&n
bsp;the sequences, or None if no<br> | |
249 datatype
should be enforced.<br> | |
250 msg: Optional message to use on
failure instead of a list of<br> | |
251 differen
ces.</tt></dd></dl> | |
252 | |
253 <dl><dt><a name="CrOSTestCase-assertSetEqual"><strong>assertSetEqual</strong></a
>(self, set1, set2, msg<font color="#909090">=None</font>)</dt><dd><tt>A se
t-specific equality assertion.<br> | |
254 <br> | |
255 Args:<br> | |
256 set1: The first set to compare.
<br> | |
257 set2: The second set to compare
.<br> | |
258 msg: Optional message to use on
failure instead of a list of<br> | |
259 differen
ces.<br> | |
260 <br> | |
261 assertSetEqual uses ducktyping to support different&nbs
p;types of sets, and<br> | |
262 is optimized for sets specifically (parameters mus
t support a<br> | |
263 difference method).</tt></dd></dl> | |
264 | |
265 <dl><dt><a name="CrOSTestCase-assertTrue"><strong>assertTrue</strong></a>(self,
expr, msg<font color="#909090">=None</font>)</dt><dd><tt>Check that th
e expression is true.</tt></dd></dl> | |
266 | |
267 <dl><dt><a name="CrOSTestCase-assertTupleEqual"><strong>assertTupleEqual</strong
></a>(self, tuple1, tuple2, msg<font color="#909090">=None</font>)</dt><dd><tt>A
tuple-specific equality assertion.<br> | |
268 <br> | |
269 Args:<br> | |
270 tuple1: The first tuple to comp
are.<br> | |
271 tuple2: The second tuple to com
pare.<br> | |
272 msg: Optional message to use on
failure instead of a list of<br> | |
273 differen
ces.</tt></dd></dl> | |
274 | |
275 <dl><dt><a name="CrOSTestCase-assert_"><strong>assert_</strong></a> = assertTrue
(self, expr, msg<font color="#909090">=None</font>)</dt><dd><tt>Check that&
nbsp;the expression is true.</tt></dd></dl> | |
276 | |
277 <dl><dt><a name="CrOSTestCase-countTestCases"><strong>countTestCases</strong></a
>(self)</dt></dl> | |
278 | |
279 <dl><dt><a name="CrOSTestCase-debug"><strong>debug</strong></a>(self)</dt><dd><t
t>Run the test without collecting errors in a
TestResult</tt></dd></dl> | |
280 | |
281 <dl><dt><a name="CrOSTestCase-defaultTestResult"><strong>defaultTestResult</stro
ng></a>(self)</dt></dl> | |
282 | |
283 <dl><dt><a name="CrOSTestCase-doCleanups"><strong>doCleanups</strong></a>(self)<
/dt><dd><tt>Execute all cleanup functions. Normally cal
led for you after<br> | |
284 tearDown.</tt></dd></dl> | |
285 | |
286 <dl><dt><a name="CrOSTestCase-fail"><strong>fail</strong></a>(self, msg<font col
or="#909090">=None</font>)</dt><dd><tt>Fail immediately, with the
given message.</tt></dd></dl> | |
287 | |
288 <dl><dt><a name="CrOSTestCase-failIf"><strong>failIf</strong></a> = deprecated_f
unc(*args, **kwargs)</dt></dl> | |
289 | |
290 <dl><dt><a name="CrOSTestCase-failIfAlmostEqual"><strong>failIfAlmostEqual</stro
ng></a> = deprecated_func(*args, **kwargs)</dt></dl> | |
291 | |
292 <dl><dt><a name="CrOSTestCase-failIfEqual"><strong>failIfEqual</strong></a> = de
precated_func(*args, **kwargs)</dt></dl> | |
293 | |
294 <dl><dt><a name="CrOSTestCase-failUnless"><strong>failUnless</strong></a> = depr
ecated_func(*args, **kwargs)</dt></dl> | |
295 | |
296 <dl><dt><a name="CrOSTestCase-failUnlessAlmostEqual"><strong>failUnlessAlmostEqu
al</strong></a> = deprecated_func(*args, **kwargs)</dt></dl> | |
297 | |
298 <dl><dt><a name="CrOSTestCase-failUnlessEqual"><strong>failUnlessEqual</strong><
/a> = deprecated_func(*args, **kwargs)</dt></dl> | |
299 | |
300 <dl><dt><a name="CrOSTestCase-failUnlessRaises"><strong>failUnlessRaises</strong
></a> = deprecated_func(*args, **kwargs)</dt></dl> | |
301 | |
302 <dl><dt><a name="CrOSTestCase-id"><strong>id</strong></a>(self)</dt></dl> | |
303 | |
304 <dl><dt><a name="CrOSTestCase-run"><strong>run</strong></a>(self, result<font co
lor="#909090">=None</font>)</dt></dl> | |
305 | |
306 <dl><dt><a name="CrOSTestCase-shortDescription"><strong>shortDescription</strong
></a>(self)</dt><dd><tt>Returns a one-line description of&nb
sp;the test, or None if no<br> | |
307 description has been provided.<br> | |
308 <br> | |
309 The default implementation of this method returns&
nbsp;the first line of<br> | |
310 the specified test method's docstring.</tt></dd></dl> | |
311 | |
312 <dl><dt><a name="CrOSTestCase-skipTest"><strong>skipTest</strong></a>(self, reas
on)</dt><dd><tt>Skip this test.</tt></dd></dl> | |
313 | |
314 <dl><dt><a name="CrOSTestCase-tearDown"><strong>tearDown</strong></a>(self)</dt>
<dd><tt>Hook method for deconstructing the test fi
xture after testing it.</tt></dd></dl> | |
315 | |
316 <hr> | |
317 Class methods inherited from <a href="unittest.case.html#TestCase">unittest.case
.TestCase</a>:<br> | |
318 <dl><dt><a name="CrOSTestCase-setUpClass"><strong>setUpClass</strong></a>(cls)<f
ont color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.htm
l#type">__builtin__.type</a></font></font></dt><dd><tt>Hook method for
setting up class fixture before running test
s in the class.</tt></dd></dl> | |
319 | |
320 <dl><dt><a name="CrOSTestCase-tearDownClass"><strong>tearDownClass</strong></a>(
cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin
__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Hook method&nb
sp;for deconstructing the class fixture after runn
ing all tests in the class.</tt></dd></dl> | |
321 | |
322 <hr> | |
323 Data descriptors inherited from <a href="unittest.case.html#TestCase">unittest.c
ase.TestCase</a>:<br> | |
324 <dl><dt><strong>__dict__</strong></dt> | |
325 <dd><tt>dictionary for instance variables (if defined)<
/tt></dd> | |
326 </dl> | |
327 <dl><dt><strong>__weakref__</strong></dt> | |
328 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> | |
329 </dl> | |
330 <hr> | |
331 Data and other attributes inherited from <a href="unittest.case.html#TestCase">u
nittest.case.TestCase</a>:<br> | |
332 <dl><dt><strong>failureException</strong> = <type 'exceptions.AssertionError'
><dd><tt>Assertion failed.</tt></dl> | |
333 | |
334 <dl><dt><strong>longMessage</strong> = False</dl> | |
335 | |
336 <dl><dt><strong>maxDiff</strong> = 640</dl> | |
337 | |
338 </td></tr></table></td></tr></table> | |
339 </body></html> | |
OLD | NEW |