OLD | NEW |
| (Empty) |
1 | |
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |
3 <html><head><title>Python: module telemetry.testing.browser_test_case</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
.testing.html"><font color="#ffffff">testing</font></a>.browser_test_case</stron
g></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/testing/browser_test_case.py">telemetry/testing/browser_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.testing.options_for_unittests.html">telemetry.testing.options
_for_unittests</a><br> | |
25 </td><td width="25%" valign=top><a href="os.html">os</a><br> | |
26 <a href="telemetry.internal.util.path.html">telemetry.internal.util.path</a><br> | |
27 </td><td width="25%" valign=top><a href="unittest.html">unittest</a><br> | |
28 </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> | |
29 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
30 <tr bgcolor="#ee77aa"> | |
31 <td colspan=3 valign=bottom> <br> | |
32 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big
></font></td></tr> | |
33 | |
34 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td>
</td> | |
35 <td width="100%"><dl> | |
36 <dt><font face="helvetica, arial"><a href="unittest.case.html#TestCase">unittest
.case.TestCase</a>(<a href="__builtin__.html#object">__builtin__.object</a>) | |
37 </font></dt><dd> | |
38 <dl> | |
39 <dt><font face="helvetica, arial"><a href="telemetry.testing.browser_test_case.h
tml#BrowserTestCase">BrowserTestCase</a> | |
40 </font></dt></dl> | |
41 </dd> | |
42 </dl> | |
43 <p> | |
44 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
45 <tr bgcolor="#ffc8d8"> | |
46 <td colspan=3 valign=bottom> <br> | |
47 <font color="#000000" face="helvetica, arial"><a name="BrowserTestCase">class <s
trong>BrowserTestCase</strong></a>(<a href="unittest.case.html#TestCase">unittes
t.case.TestCase</a>)</font></td></tr> | |
48 | |
49 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> | |
50 <td width="100%"><dl><dt>Method resolution order:</dt> | |
51 <dd><a href="telemetry.testing.browser_test_case.html#BrowserTestCase">BrowserTe
stCase</a></dd> | |
52 <dd><a href="unittest.case.html#TestCase">unittest.case.TestCase</a></dd> | |
53 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> | |
54 </dl> | |
55 <hr> | |
56 Class methods defined here:<br> | |
57 <dl><dt><a name="BrowserTestCase-CustomizeBrowserOptions"><strong>CustomizeBrows
erOptions</strong></a>(cls, options)<font color="#909090"><font face="helvetica,
arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font>
</dt><dd><tt>Override to add test-specific options to&n
bsp;the BrowserOptions object</tt></dd></dl> | |
58 | |
59 <dl><dt><a name="BrowserTestCase-UrlOfUnittestFile"><strong>UrlOfUnittestFile</s
trong></a>(cls, filename)<font color="#909090"><font face="helvetica, arial"> fr
om <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl> | |
60 | |
61 <dl><dt><a name="BrowserTestCase-setUpClass"><strong>setUpClass</strong></a>(cls
)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.
html#type">__builtin__.type</a></font></font></dt></dl> | |
62 | |
63 <dl><dt><a name="BrowserTestCase-tearDownClass"><strong>tearDownClass</strong></
a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__buil
tin__.html#type">__builtin__.type</a></font></font></dt></dl> | |
64 | |
65 <hr> | |
66 Methods inherited from <a href="unittest.case.html#TestCase">unittest.case.TestC
ase</a>:<br> | |
67 <dl><dt><a name="BrowserTestCase-__call__"><strong>__call__</strong></a>(self, *
args, **kwds)</dt></dl> | |
68 | |
69 <dl><dt><a name="BrowserTestCase-__eq__"><strong>__eq__</strong></a>(self, other
)</dt></dl> | |
70 | |
71 <dl><dt><a name="BrowserTestCase-__hash__"><strong>__hash__</strong></a>(self)</
dt></dl> | |
72 | |
73 <dl><dt><a name="BrowserTestCase-__init__"><strong>__init__</strong></a>(self, m
ethodName<font color="#909090">='runTest'</font>)</dt><dd><tt>Create an&nbs
p;instance of the class that will use the&nbs
p;named test<br> | |
74 method when executed. Raises a ValueError if
the instance does<br> | |
75 not have a method with the specified name.</t
t></dd></dl> | |
76 | |
77 <dl><dt><a name="BrowserTestCase-__ne__"><strong>__ne__</strong></a>(self, other
)</dt></dl> | |
78 | |
79 <dl><dt><a name="BrowserTestCase-__repr__"><strong>__repr__</strong></a>(self)</
dt></dl> | |
80 | |
81 <dl><dt><a name="BrowserTestCase-__str__"><strong>__str__</strong></a>(self)</dt
></dl> | |
82 | |
83 <dl><dt><a name="BrowserTestCase-addCleanup"><strong>addCleanup</strong></a>(sel
f, function, *args, **kwargs)</dt><dd><tt>Add a function, with&nb
sp;arguments, to be called when the test is<b
r> | |
84 completed. Functions added are called on a LI
FO basis and are<br> | |
85 called after tearDown on test failure or succ
ess.<br> | |
86 <br> | |
87 Cleanup items are called even if setUp fails&
nbsp;(unlike tearDown).</tt></dd></dl> | |
88 | |
89 <dl><dt><a name="BrowserTestCase-addTypeEqualityFunc"><strong>addTypeEqualityFun
c</strong></a>(self, typeobj, function)</dt><dd><tt>Add a type sp
ecific assertEqual style function to compare a&nbs
p;type.<br> | |
90 <br> | |
91 This method is for use by <a href="unittest.case.h
tml#TestCase">TestCase</a> subclasses that need to regi
ster<br> | |
92 their own type equality functions to provide
nicer error messages.<br> | |
93 <br> | |
94 Args:<br> | |
95 typeobj: The data type to call&
nbsp;this function on when both values<br> | |
96 are 
;of the same type in <a href="#BrowserTestCase-assertEq
ual">assertEqual</a>().<br> | |
97 function: The callable taking two&nb
sp;arguments and an optional<br> | |
98 msg=&nbs
p;argument that raises self.<strong>failureException</strong>&nbs
p;with a<br> | |
99 useful&n
bsp;error message when the two arguments are
not equal.</tt></dd></dl> | |
100 | |
101 <dl><dt><a name="BrowserTestCase-assertAlmostEqual"><strong>assertAlmostEqual</s
trong></a>(self, first, second, places<font color="#909090">=None</font>, msg<fo
nt color="#909090">=None</font>, delta<font color="#909090">=None</font>)</dt><d
d><tt>Fail if the two objects are unequal as&
nbsp;determined by their<br> | |
102 difference rounded to the given number of dec
imal places<br> | |
103 (default 7) and comparing to zero, or by 
;comparing that the<br> | |
104 between the two objects is more than the 
;given delta.<br> | |
105 <br> | |
106 Note that decimal places (from zero) are usua
lly not the same<br> | |
107 as significant digits (measured from the most 
;signficant digit).<br> | |
108 <br> | |
109 If the two objects compare equal then they&nb
sp;will automatically<br> | |
110 compare almost equal.</tt></dd></dl> | |
111 | |
112 <dl><dt><a name="BrowserTestCase-assertAlmostEquals"><strong>assertAlmostEquals<
/strong></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
unequal as determined by their<br> | |
113 difference rounded to the given number of dec
imal places<br> | |
114 (default 7) and comparing to zero, or by 
;comparing that the<br> | |
115 between the two objects is more than the 
;given delta.<br> | |
116 <br> | |
117 Note that decimal places (from zero) are usua
lly not the same<br> | |
118 as significant digits (measured from the most 
;signficant digit).<br> | |
119 <br> | |
120 If the two objects compare equal then they&nb
sp;will automatically<br> | |
121 compare almost equal.</tt></dd></dl> | |
122 | |
123 <dl><dt><a name="BrowserTestCase-assertDictContainsSubset"><strong>assertDictCon
tainsSubset</strong></a>(self, expected, actual, msg<font color="#909090">=None<
/font>)</dt><dd><tt>Checks whether actual is a superset
of expected.</tt></dd></dl> | |
124 | |
125 <dl><dt><a name="BrowserTestCase-assertDictEqual"><strong>assertDictEqual</stron
g></a>(self, d1, d2, msg<font color="#909090">=None</font>)</dt></dl> | |
126 | |
127 <dl><dt><a name="BrowserTestCase-assertEqual"><strong>assertEqual</strong></a>(s
elf, first, second, msg<font color="#909090">=None</font>)</dt><dd><tt>Fail 
;if the two objects are unequal as determined
by the '=='<br> | |
128 operator.</tt></dd></dl> | |
129 | |
130 <dl><dt><a name="BrowserTestCase-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
determined by the '=='<br> | |
131 operator.</tt></dd></dl> | |
132 | |
133 <dl><dt><a name="BrowserTestCase-assertFalse"><strong>assertFalse</strong></a>(s
elf, expr, msg<font color="#909090">=None</font>)</dt><dd><tt>Check that&nb
sp;the expression is false.</tt></dd></dl> | |
134 | |
135 <dl><dt><a name="BrowserTestCase-assertGreater"><strong>assertGreater</strong></
a>(self, a, b, msg<font color="#909090">=None</font>)</dt><dd><tt>Just like
<a href="#BrowserTestCase-assertTrue">assertTrue</a>(a > b),&
nbsp;but with a nicer default message.</tt></dd></dl> | |
136 | |
137 <dl><dt><a name="BrowserTestCase-assertGreaterEqual"><strong>assertGreaterEqual<
/strong></a>(self, a, b, msg<font color="#909090">=None</font>)</dt><dd><tt>Just
like <a href="#BrowserTestCase-assertTrue">assertTrue</a>(a >
= b), but with a nicer default message.</tt><
/dd></dl> | |
138 | |
139 <dl><dt><a name="BrowserTestCase-assertIn"><strong>assertIn</strong></a>(self, m
ember, container, msg<font color="#909090">=None</font>)</dt><dd><tt>Just l
ike <a href="#BrowserTestCase-assertTrue">assertTrue</a>(a in b),
but with a nicer default message.</tt></dd></dl> | |
140 | |
141 <dl><dt><a name="BrowserTestCase-assertIs"><strong>assertIs</strong></a>(self, e
xpr1, expr2, msg<font color="#909090">=None</font>)</dt><dd><tt>Just like&n
bsp;<a href="#BrowserTestCase-assertTrue">assertTrue</a>(a is b), 
;but with a nicer default message.</tt></dd></dl> | |
142 | |
143 <dl><dt><a name="BrowserTestCase-assertIsInstance"><strong>assertIsInstance</str
ong></a>(self, obj, cls, msg<font color="#909090">=None</font>)</dt><dd><tt>Same
as <a href="#BrowserTestCase-assertTrue">assertTrue</a>(isinstance(ob
j, cls)), with a nicer<br> | |
144 default message.</tt></dd></dl> | |
145 | |
146 <dl><dt><a name="BrowserTestCase-assertIsNone"><strong>assertIsNone</strong></a>
(self, obj, msg<font color="#909090">=None</font>)</dt><dd><tt>Same as 
;<a href="#BrowserTestCase-assertTrue">assertTrue</a>(obj is None),&nb
sp;with a nicer default message.</tt></dd></dl> | |
147 | |
148 <dl><dt><a name="BrowserTestCase-assertIsNot"><strong>assertIsNot</strong></a>(s
elf, expr1, expr2, msg<font color="#909090">=None</font>)</dt><dd><tt>Just
like <a href="#BrowserTestCase-assertTrue">assertTrue</a>(a is no
t b), but with a nicer default message.</tt><
/dd></dl> | |
149 | |
150 <dl><dt><a name="BrowserTestCase-assertIsNotNone"><strong>assertIsNotNone</stron
g></a>(self, obj, msg<font color="#909090">=None</font>)</dt><dd><tt>Included&nb
sp;for symmetry with assertIsNone.</tt></dd></dl> | |
151 | |
152 <dl><dt><a name="BrowserTestCase-assertItemsEqual"><strong>assertItemsEqual</str
ong></a>(self, expected_seq, actual_seq, msg<font color="#909090">=None</font>)<
/dt><dd><tt>An unordered sequence specific comparison.
It asserts that<br> | |
153 actual_seq and expected_seq have the same element&
nbsp;counts.<br> | |
154 Equivalent to::<br> | |
155 <br> | |
156 <a href="#BrowserTestCase-assertEqual">assertEqual</a>(C
ounter(iter(actual_seq)),<br> | |
157 &n
bsp; Counter(iter(expected_seq)))<br> | |
158 <br> | |
159 Asserts that each element has the same count&
nbsp;in both sequences.<br> | |
160 Example:<br> | |
161 - [0, 1, 1] and [1, 0,&nbs
p;1] compare equal.<br> | |
162 - [0, 0, 1] and [0, 1]&nbs
p;compare unequal.</tt></dd></dl> | |
163 | |
164 <dl><dt><a name="BrowserTestCase-assertLess"><strong>assertLess</strong></a>(sel
f, a, b, msg<font color="#909090">=None</font>)</dt><dd><tt>Just like
<a href="#BrowserTestCase-assertTrue">assertTrue</a>(a < b), b
ut with a nicer default message.</tt></dd></dl> | |
165 | |
166 <dl><dt><a name="BrowserTestCase-assertLessEqual"><strong>assertLessEqual</stron
g></a>(self, a, b, msg<font color="#909090">=None</font>)</dt><dd><tt>Just
like <a href="#BrowserTestCase-assertTrue">assertTrue</a>(a <= 
;b), but with a nicer default message.</tt></dd></
dl> | |
167 | |
168 <dl><dt><a name="BrowserTestCase-assertListEqual"><strong>assertListEqual</stron
g></a>(self, list1, list2, msg<font color="#909090">=None</font>)</dt><dd><tt>A&
nbsp;list-specific equality assertion.<br> | |
169 <br> | |
170 Args:<br> | |
171 list1: The first list to compar
e.<br> | |
172 list2: The second list to compa
re.<br> | |
173 msg: Optional message to use on
failure instead of a list of<br> | |
174 differen
ces.</tt></dd></dl> | |
175 | |
176 <dl><dt><a name="BrowserTestCase-assertMultiLineEqual"><strong>assertMultiLineEq
ual</strong></a>(self, first, second, msg<font color="#909090">=None</font>)</dt
><dd><tt>Assert that two multi-line strings are eq
ual.</tt></dd></dl> | |
177 | |
178 <dl><dt><a name="BrowserTestCase-assertNotAlmostEqual"><strong>assertNotAlmostEq
ual</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> | |
179 difference rounded to the given number of dec
imal places<br> | |
180 (default 7) and comparing to zero, or by 
;comparing that the<br> | |
181 between the two objects is less than the 
;given delta.<br> | |
182 <br> | |
183 Note that decimal places (from zero) are usua
lly not the same<br> | |
184 as significant digits (measured from the most 
;signficant digit).<br> | |
185 <br> | |
186 Objects that are equal automatically fail.</tt></dd></d
l> | |
187 | |
188 <dl><dt><a name="BrowserTestCase-assertNotAlmostEquals"><strong>assertNotAlmostE
quals</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
are equal as determined by their<br> | |
189 difference rounded to the given number of dec
imal places<br> | |
190 (default 7) and comparing to zero, or by 
;comparing that the<br> | |
191 between the two objects is less than the 
;given delta.<br> | |
192 <br> | |
193 Note that decimal places (from zero) are usua
lly not the same<br> | |
194 as significant digits (measured from the most 
;signficant digit).<br> | |
195 <br> | |
196 Objects that are equal automatically fail.</tt></dd></d
l> | |
197 | |
198 <dl><dt><a name="BrowserTestCase-assertNotEqual"><strong>assertNotEqual</strong>
</a>(self, first, second, msg<font color="#909090">=None</font>)</dt><dd><tt>Fai
l if the two objects are equal as determ
ined by the '!='<br> | |
199 operator.</tt></dd></dl> | |
200 | |
201 <dl><dt><a name="BrowserTestCase-assertNotEquals"><strong>assertNotEquals</stron
g></a> = assertNotEqual(self, first, second, msg<font color="#909090">=None</fon
t>)</dt><dd><tt>Fail if the two objects are equal&
nbsp;as determined by the '!='<br> | |
202 operator.</tt></dd></dl> | |
203 | |
204 <dl><dt><a name="BrowserTestCase-assertNotIn"><strong>assertNotIn</strong></a>(s
elf, member, container, msg<font color="#909090">=None</font>)</dt><dd><tt>Just&
nbsp;like <a href="#BrowserTestCase-assertTrue">assertTrue</a>(a not&n
bsp;in b), but with a nicer default message.<
/tt></dd></dl> | |
205 | |
206 <dl><dt><a name="BrowserTestCase-assertNotIsInstance"><strong>assertNotIsInstanc
e</strong></a>(self, obj, cls, msg<font color="#909090">=None</font>)</dt><dd><t
t>Included for symmetry with assertIsInstance.</tt></dd></dl
> | |
207 | |
208 <dl><dt><a name="BrowserTestCase-assertNotRegexpMatches"><strong>assertNotRegexp
Matches</strong></a>(self, text, unexpected_regexp, msg<font color="#909090">=No
ne</font>)</dt><dd><tt>Fail the test if the text m
atches the regular expression.</tt></dd></dl> | |
209 | |
210 <dl><dt><a name="BrowserTestCase-assertRaises"><strong>assertRaises</strong></a>
(self, excClass, callableObj<font color="#909090">=None</font>, *args, **kwargs)
</dt><dd><tt>Fail unless an exception of class exc
Class is raised<br> | |
211 by callableObj when invoked with arguments args&nb
sp;and keyword<br> | |
212 arguments kwargs. If a different type of exce
ption is<br> | |
213 raised, it will not be caught, and the t
est case will be<br> | |
214 deemed to have suffered an error, exactly as&
nbsp;for an<br> | |
215 unexpected exception.<br> | |
216 <br> | |
217 If called with callableObj omitted or None, w
ill return a<br> | |
218 context object used like this::<br> | |
219 <br> | |
220 with <a href="#BrowserTestCase-assertRaises">
assertRaises</a>(SomeException):<br> | |
221 do_something()<br> | |
222 <br> | |
223 The context manager keeps a reference to the&
nbsp;exception as<br> | |
224 the 'exception' attribute. This allows you to 
;inspect the<br> | |
225 exception after the assertion::<br> | |
226 <br> | |
227 with <a href="#BrowserTestCase-assertRaises">assert
Raises</a>(SomeException) as cm:<br> | |
228 do_something()<br> | |
229 the_exception = cm.exception<br> | |
230 <a href="#BrowserTestCase-assertEqual">assertEqual</a>(t
he_exception.error_code, 3)</tt></dd></dl> | |
231 | |
232 <dl><dt><a name="BrowserTestCase-assertRaisesRegexp"><strong>assertRaisesRegexp<
/strong></a>(self, expected_exception, expected_regexp, callable_obj<font color=
"#909090">=None</font>, *args, **kwargs)</dt><dd><tt>Asserts that the&
nbsp;message in a raised exception matches a
regexp.<br> | |
233 <br> | |
234 Args:<br> | |
235 expected_exception: Exception class expec
ted to be raised.<br> | |
236 expected_regexp: Regexp (re pattern
object or string) expected<br> | |
237 to
be found in error message.<br> | |
238 callable_obj: Function to be called.
<br> | |
239 args: Extra args.<br> | |
240 kwargs: Extra kwargs.</tt></dd></dl> | |
241 | |
242 <dl><dt><a name="BrowserTestCase-assertRegexpMatches"><strong>assertRegexpMatche
s</strong></a>(self, text, expected_regexp, msg<font color="#909090">=None</font
>)</dt><dd><tt>Fail the test unless the text match
es the regular expression.</tt></dd></dl> | |
243 | |
244 <dl><dt><a name="BrowserTestCase-assertSequenceEqual"><strong>assertSequenceEqua
l</strong></a>(self, seq1, seq2, msg<font color="#909090">=None</font>, seq_type
<font color="#909090">=None</font>)</dt><dd><tt>An equality assertion&
nbsp;for ordered sequences (like lists and tuples)
.<br> | |
245 <br> | |
246 For the purposes of this function, a valid&nb
sp;ordered sequence type is one<br> | |
247 which can be indexed, has a length, and
has an equality operator.<br> | |
248 <br> | |
249 Args:<br> | |
250 seq1: The first sequence to com
pare.<br> | |
251 seq2: The second sequence to co
mpare.<br> | |
252 seq_type: The expected datatype of&n
bsp;the sequences, or None if no<br> | |
253 datatype
should be enforced.<br> | |
254 msg: Optional message to use on
failure instead of a list of<br> | |
255 differen
ces.</tt></dd></dl> | |
256 | |
257 <dl><dt><a name="BrowserTestCase-assertSetEqual"><strong>assertSetEqual</strong>
</a>(self, set1, set2, msg<font color="#909090">=None</font>)</dt><dd><tt>A 
;set-specific equality assertion.<br> | |
258 <br> | |
259 Args:<br> | |
260 set1: The first set to compare.
<br> | |
261 set2: The second set to compare
.<br> | |
262 msg: Optional message to use on
failure instead of a list of<br> | |
263 differen
ces.<br> | |
264 <br> | |
265 assertSetEqual uses ducktyping to support different&nbs
p;types of sets, and<br> | |
266 is optimized for sets specifically (parameters mus
t support a<br> | |
267 difference method).</tt></dd></dl> | |
268 | |
269 <dl><dt><a name="BrowserTestCase-assertTrue"><strong>assertTrue</strong></a>(sel
f, expr, msg<font color="#909090">=None</font>)</dt><dd><tt>Check that 
;the expression is true.</tt></dd></dl> | |
270 | |
271 <dl><dt><a name="BrowserTestCase-assertTupleEqual"><strong>assertTupleEqual</str
ong></a>(self, tuple1, tuple2, msg<font color="#909090">=None</font>)</dt><dd><t
t>A tuple-specific equality assertion.<br> | |
272 <br> | |
273 Args:<br> | |
274 tuple1: The first tuple to comp
are.<br> | |
275 tuple2: The second tuple to com
pare.<br> | |
276 msg: Optional message to use on
failure instead of a list of<br> | |
277 differen
ces.</tt></dd></dl> | |
278 | |
279 <dl><dt><a name="BrowserTestCase-assert_"><strong>assert_</strong></a> = assertT
rue(self, expr, msg<font color="#909090">=None</font>)</dt><dd><tt>Check th
at the expression is true.</tt></dd></dl> | |
280 | |
281 <dl><dt><a name="BrowserTestCase-countTestCases"><strong>countTestCases</strong>
</a>(self)</dt></dl> | |
282 | |
283 <dl><dt><a name="BrowserTestCase-debug"><strong>debug</strong></a>(self)</dt><dd
><tt>Run the test without collecting errors in&nbs
p;a TestResult</tt></dd></dl> | |
284 | |
285 <dl><dt><a name="BrowserTestCase-defaultTestResult"><strong>defaultTestResult</s
trong></a>(self)</dt></dl> | |
286 | |
287 <dl><dt><a name="BrowserTestCase-doCleanups"><strong>doCleanups</strong></a>(sel
f)</dt><dd><tt>Execute all cleanup functions. Normally
called for you after<br> | |
288 tearDown.</tt></dd></dl> | |
289 | |
290 <dl><dt><a name="BrowserTestCase-fail"><strong>fail</strong></a>(self, msg<font
color="#909090">=None</font>)</dt><dd><tt>Fail immediately, with
the given message.</tt></dd></dl> | |
291 | |
292 <dl><dt><a name="BrowserTestCase-failIf"><strong>failIf</strong></a> = deprecate
d_func(*args, **kwargs)</dt></dl> | |
293 | |
294 <dl><dt><a name="BrowserTestCase-failIfAlmostEqual"><strong>failIfAlmostEqual</s
trong></a> = deprecated_func(*args, **kwargs)</dt></dl> | |
295 | |
296 <dl><dt><a name="BrowserTestCase-failIfEqual"><strong>failIfEqual</strong></a> =
deprecated_func(*args, **kwargs)</dt></dl> | |
297 | |
298 <dl><dt><a name="BrowserTestCase-failUnless"><strong>failUnless</strong></a> = d
eprecated_func(*args, **kwargs)</dt></dl> | |
299 | |
300 <dl><dt><a name="BrowserTestCase-failUnlessAlmostEqual"><strong>failUnlessAlmost
Equal</strong></a> = deprecated_func(*args, **kwargs)</dt></dl> | |
301 | |
302 <dl><dt><a name="BrowserTestCase-failUnlessEqual"><strong>failUnlessEqual</stron
g></a> = deprecated_func(*args, **kwargs)</dt></dl> | |
303 | |
304 <dl><dt><a name="BrowserTestCase-failUnlessRaises"><strong>failUnlessRaises</str
ong></a> = deprecated_func(*args, **kwargs)</dt></dl> | |
305 | |
306 <dl><dt><a name="BrowserTestCase-id"><strong>id</strong></a>(self)</dt></dl> | |
307 | |
308 <dl><dt><a name="BrowserTestCase-run"><strong>run</strong></a>(self, result<font
color="#909090">=None</font>)</dt></dl> | |
309 | |
310 <dl><dt><a name="BrowserTestCase-setUp"><strong>setUp</strong></a>(self)</dt><dd
><tt>Hook method for setting up the test fixt
ure before exercising it.</tt></dd></dl> | |
311 | |
312 <dl><dt><a name="BrowserTestCase-shortDescription"><strong>shortDescription</str
ong></a>(self)</dt><dd><tt>Returns a one-line description of
the test, or None if no<br> | |
313 description has been provided.<br> | |
314 <br> | |
315 The default implementation of this method returns&
nbsp;the first line of<br> | |
316 the specified test method's docstring.</tt></dd></dl> | |
317 | |
318 <dl><dt><a name="BrowserTestCase-skipTest"><strong>skipTest</strong></a>(self, r
eason)</dt><dd><tt>Skip this test.</tt></dd></dl> | |
319 | |
320 <dl><dt><a name="BrowserTestCase-tearDown"><strong>tearDown</strong></a>(self)</
dt><dd><tt>Hook method for deconstructing the test 
;fixture after testing it.</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><p> | |
339 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
340 <tr bgcolor="#eeaa77"> | |
341 <td colspan=3 valign=bottom> <br> | |
342 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></b
ig></font></td></tr> | |
343 | |
344 <tr><td bgcolor="#eeaa77"><tt> </tt></td><td>
</td> | |
345 <td width="100%"><dl><dt><a name="-teardown_browser"><strong>teardown_browser</s
trong></a>()</dt></dl> | |
346 </td></tr></table><p> | |
347 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
348 <tr bgcolor="#55aa55"> | |
349 <td colspan=3 valign=bottom> <br> | |
350 <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></
font></td></tr> | |
351 | |
352 <tr><td bgcolor="#55aa55"><tt> </tt></td><td>
</td> | |
353 <td width="100%"><strong>current_browser</strong> = None<br> | |
354 <strong>current_browser_options</strong> = None</td></tr></table> | |
355 </body></html> | |
OLD | NEW |