1 <?xml version="1.0" encoding="ascii"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6 <title>lxml.tests.test_css.CSSTestCase</title>
7 <link rel="stylesheet" href="epydoc.css" type="text/css" />
8 <script type="text/javascript" src="epydoc.js"></script>
11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
13 <!-- ==================== NAVIGATION BAR ==================== -->
14 <table class="navbar" border="0" width="100%" cellpadding="0"
15 bgcolor="#a0c0ff" cellspacing="0">
18 <th> <a
19 href="lxml-module.html">Home</a> </th>
22 <th> <a
23 href="module-tree.html">Trees</a> </th>
26 <th> <a
27 href="identifier-index.html">Indices</a> </th>
30 <th> <a
31 href="help.html">Help</a> </th>
33 <!-- Project homepage -->
34 <th class="navbar" align="right" width="100%">
35 <table border="0" cellpadding="0" cellspacing="0">
36 <tr><th class="navbar" align="center"
37 ><a class="navbar" target="_top" href="/">lxml API</a></th>
41 <table width="100%" cellpadding="0" cellspacing="0">
44 <span class="breadcrumbs">
45 <a href="lxml-module.html">Package lxml</a> ::
46 <a href="lxml.tests-module.html">Package tests</a> ::
47 <a href="lxml.tests.test_css-module.html">Module test_css</a> ::
48 Class CSSTestCase
52 <table cellpadding="0" cellspacing="0">
53 <!-- hide/show private -->
54 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
55 onclick="toggle_private();">hide private</a>]</span></td></tr>
56 <tr><td align="right"><span class="options"
57 >[<a href="frames.html" target="_top">frames</a
58 >] | <a href="lxml.tests.test_css.CSSTestCase-class.html"
59 target="_top">no frames</a>]</span></td></tr>
64 <!-- ==================== CLASS DESCRIPTION ==================== -->
65 <h1 class="epydoc">Class CSSTestCase</h1><p class="nomargin-top"><span class="codelink"><a href="lxml.tests.test_css-pysrc.html#CSSTestCase">source code</a></span></p>
66 <pre class="base-tree">
69 unittest.case.TestCase --+
71 <a href="lxml.tests.common_imports.HelperTestCase-class.html">common_imports.HelperTestCase</a> --+
73 <strong class="uidshort">CSSTestCase</strong>
77 <!-- ==================== NESTED CLASSES ==================== -->
78 <a name="section-NestedClasses"></a>
79 <table class="summary" border="1" cellpadding="3"
80 cellspacing="0" width="100%" bgcolor="white">
81 <tr bgcolor="#70b0f0" class="table-header">
82 <td colspan="2" class="table-header">
83 <table border="0" cellpadding="0" cellspacing="0" width="100%">
85 <td align="left"><span class="table-header">Nested Classes</span></td>
86 <td align="right" valign="top"
87 ><span class="options">[<a href="#section-NestedClasses"
88 class="privatelink" onclick="toggle_private();"
89 >hide private</a>]</span></td>
95 <td colspan="2" class="summary">
96 <p class="indent-wrapped-lines"><b>Inherited from <code>unittest.case.TestCase</code></b>:
97 <code><a href="exceptions.AssertionError-class.html">failureException</a></code>
102 <!-- ==================== INSTANCE METHODS ==================== -->
103 <a name="section-InstanceMethods"></a>
104 <table class="summary" border="1" cellpadding="3"
105 cellspacing="0" width="100%" bgcolor="white">
106 <tr bgcolor="#70b0f0" class="table-header">
107 <td colspan="2" class="table-header">
108 <table border="0" cellpadding="0" cellspacing="0" width="100%">
110 <td align="left"><span class="table-header">Instance Methods</span></td>
111 <td align="right" valign="top"
112 ><span class="options">[<a href="#section-InstanceMethods"
113 class="privatelink" onclick="toggle_private();"
114 >hide private</a>]</span></td>
120 <td width="15%" align="right" valign="top" class="summary">
121 <span class="summary-type"> </span>
122 </td><td class="summary">
123 <table width="100%" cellpadding="0" cellspacing="0" border="0">
125 <td><span class="summary-sig"><a href="lxml.tests.test_css.CSSTestCase-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
126 <span class="summary-sig-arg">index</span>)</span><br />
127 Create an instance of the class that will use the named test
128 method when executed. Raises a ValueError if the instance does
129 not have a method with the specified name.</td>
130 <td align="right" valign="top">
131 <span class="codelink"><a href="lxml.tests.test_css-pysrc.html#CSSTestCase.__init__">source code</a></span>
140 <td width="15%" align="right" valign="top" class="summary">
141 <span class="summary-type"> </span>
142 </td><td class="summary">
143 <table width="100%" cellpadding="0" cellspacing="0" border="0">
145 <td><span class="summary-sig"><a name="runTest"></a><span class="summary-sig-name">runTest</span>(<span class="summary-sig-arg">self</span>)</span></td>
146 <td align="right" valign="top">
147 <span class="codelink"><a href="lxml.tests.test_css-pysrc.html#CSSTestCase.runTest">source code</a></span>
156 <td width="15%" align="right" valign="top" class="summary">
157 <span class="summary-type"> </span>
158 </td><td class="summary">
159 <table width="100%" cellpadding="0" cellspacing="0" border="0">
161 <td><span class="summary-sig"><a href="lxml.tests.test_css.CSSTestCase-class.html#shortDescription" class="summary-sig-name">shortDescription</a>(<span class="summary-sig-arg">self</span>)</span><br />
162 Returns a one-line description of the test, or None if no
163 description has been provided.</td>
164 <td align="right" valign="top">
165 <span class="codelink"><a href="lxml.tests.test_css-pysrc.html#CSSTestCase.shortDescription">source code</a></span>
174 <td colspan="2" class="summary">
175 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.tests.common_imports.HelperTestCase-class.html">common_imports.HelperTestCase</a></code></b>:
176 <code><a href="lxml.tests.common_imports.HelperTestCase-class.html#parse">parse</a></code>,
177 <code><a href="lxml.tests.common_imports.HelperTestCase-class.html#tearDown">tearDown</a></code>
179 <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.tests.common_imports.HelperTestCase-class.html">common_imports.HelperTestCase</a></code></b> (private):
180 <code><a href="lxml.tests.common_imports.HelperTestCase-class.html#_rootstring" onclick="show_private();">_rootstring</a></code>
182 <p class="indent-wrapped-lines"><b>Inherited from <code>unittest.case.TestCase</code></b>:
183 <code>__call__</code>,
185 <code>__hash__</code>,
187 <code>__repr__</code>,
188 <code>__str__</code>,
189 <code>addCleanup</code>,
190 <code>addTypeEqualityFunc</code>,
191 <code>assertAlmostEqual</code>,
192 <code>assertAlmostEquals</code>,
193 <code>assertDictContainsSubset</code>,
194 <code>assertDictEqual</code>,
195 <code>assertEqual</code>,
196 <code>assertEquals</code>,
197 <code>assertGreater</code>,
198 <code>assertGreaterEqual</code>,
199 <code>assertIn</code>,
200 <code>assertIs</code>,
201 <code>assertIsInstance</code>,
202 <code>assertIsNone</code>,
203 <code>assertIsNot</code>,
204 <code>assertIsNotNone</code>,
205 <code>assertItemsEqual</code>,
206 <code>assertLess</code>,
207 <code>assertLessEqual</code>,
208 <code>assertListEqual</code>,
209 <code>assertMultiLineEqual</code>,
210 <code>assertNotAlmostEqual</code>,
211 <code>assertNotAlmostEquals</code>,
212 <code>assertNotEqual</code>,
213 <code>assertNotEquals</code>,
214 <code>assertNotIn</code>,
215 <code>assertNotIsInstance</code>,
216 <code>assertNotRegexpMatches</code>,
217 <code>assertRaises</code>,
218 <code>assertRaisesRegexp</code>,
219 <code>assertRegexpMatches</code>,
220 <code>assertSequenceEqual</code>,
221 <code>assertSetEqual</code>,
222 <code>assertTrue</code>,
223 <code>assertTupleEqual</code>,
224 <code>assert_</code>,
225 <code>countTestCases</code>,
227 <code>defaultTestResult</code>,
228 <code>doCleanups</code>,
231 <code>failIfAlmostEqual</code>,
232 <code>failIfEqual</code>,
233 <code>failUnless</code>,
234 <code>failUnlessAlmostEqual</code>,
235 <code>failUnlessEqual</code>,
236 <code>failUnlessRaises</code>,
240 <code>skipTest</code>
242 <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>unittest.case.TestCase</code></b> (private):
243 <code>_addSkip</code>,
244 <code>_baseAssertEqual</code>,
245 <code>_deprecate</code>,
246 <code>_formatMessage</code>,
247 <code>_getAssertEqualityFunc</code>,
248 <code>_truncateMessage</code>
250 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
251 <code>__delattr__</code>,
252 <code>__format__</code>,
253 <code>__getattribute__</code>,
254 <code>__new__</code>,
255 <code>__reduce__</code>,
256 <code>__reduce_ex__</code>,
257 <code>__setattr__</code>,
258 <code>__sizeof__</code>,
259 <code>__subclasshook__</code>
264 <!-- ==================== CLASS METHODS ==================== -->
265 <a name="section-ClassMethods"></a>
266 <table class="summary" border="1" cellpadding="3"
267 cellspacing="0" width="100%" bgcolor="white">
268 <tr bgcolor="#70b0f0" class="table-header">
269 <td colspan="2" class="table-header">
270 <table border="0" cellpadding="0" cellspacing="0" width="100%">
272 <td align="left"><span class="table-header">Class Methods</span></td>
273 <td align="right" valign="top"
274 ><span class="options">[<a href="#section-ClassMethods"
275 class="privatelink" onclick="toggle_private();"
276 >hide private</a>]</span></td>
282 <td width="15%" align="right" valign="top" class="summary">
283 <span class="summary-type"> </span>
284 </td><td class="summary">
285 <table width="100%" cellpadding="0" cellspacing="0" border="0">
287 <td><span class="summary-sig"><a name="all"></a><span class="summary-sig-name">all</span>(<span class="summary-sig-arg">cls</span>)</span></td>
288 <td align="right" valign="top">
289 <span class="codelink"><a href="lxml.tests.test_css-pysrc.html#CSSTestCase.all">source code</a></span>
298 <td colspan="2" class="summary">
299 <p class="indent-wrapped-lines"><b>Inherited from <code>unittest.case.TestCase</code></b>:
300 <code>setUpClass</code>,
301 <code>tearDownClass</code>
306 <!-- ==================== CLASS VARIABLES ==================== -->
307 <a name="section-ClassVariables"></a>
308 <table class="summary" border="1" cellpadding="3"
309 cellspacing="0" width="100%" bgcolor="white">
310 <tr bgcolor="#70b0f0" class="table-header">
311 <td colspan="2" class="table-header">
312 <table border="0" cellpadding="0" cellspacing="0" width="100%">
314 <td align="left"><span class="table-header">Class Variables</span></td>
315 <td align="right" valign="top"
316 ><span class="options">[<a href="#section-ClassVariables"
317 class="privatelink" onclick="toggle_private();"
318 >hide private</a>]</span></td>
324 <td width="15%" align="right" valign="top" class="summary">
325 <span class="summary-type"> </span>
326 </td><td class="summary">
327 <a href="lxml.tests.test_css.CSSTestCase-class.html#selectors" class="summary-name">selectors</a> = <code title="[('*', 246),
328 ('div:only-child', 22),
329 ('div:contains(CELIA)', 30),
330 ('div:nth-child(even)', 106),
331 ('div:nth-child(2n)', 106),
332 ('div:nth-child(odd)', 137),
333 ('div:nth-child(2n+1)', 137),
334 ('div:nth-child(n)', 243),
335 ..."><code class="variable-group">[</code><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">*</code><code class="variable-quote">'</code><code class="variable-op">, </code>246<code class="variable-group">)</code><code class="variable-op">, </code><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">div:only-child</code><code class="variable-quote">'</code><code class="variable-op">, </code>22<code class="variable-group">)</code><code class="variable-op">, </code><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">div:contain</code><code class="variable-ellipsis">...</code></code>
339 <td colspan="2" class="summary">
340 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="lxml.tests.common_imports.HelperTestCase-class.html">common_imports.HelperTestCase</a></code></b>:
341 <code><a href="lxml.tests.common_imports.HelperTestCase-class.html#assertFalse">assertFalse</a></code>
343 <p class="indent-wrapped-lines"><b>Inherited from <code>unittest.case.TestCase</code></b>:
344 <code>longMessage</code>,
347 <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>unittest.case.TestCase</code></b> (private):
348 <code>_classSetupFailed</code>,
349 <code>_diffThreshold</code>
354 <!-- ==================== PROPERTIES ==================== -->
355 <a name="section-Properties"></a>
356 <table class="summary" border="1" cellpadding="3"
357 cellspacing="0" width="100%" bgcolor="white">
358 <tr bgcolor="#70b0f0" class="table-header">
359 <td colspan="2" class="table-header">
360 <table border="0" cellpadding="0" cellspacing="0" width="100%">
362 <td align="left"><span class="table-header">Properties</span></td>
363 <td align="right" valign="top"
364 ><span class="options">[<a href="#section-Properties"
365 class="privatelink" onclick="toggle_private();"
366 >hide private</a>]</span></td>
372 <td colspan="2" class="summary">
373 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
374 <code>__class__</code>
379 <!-- ==================== METHOD DETAILS ==================== -->
380 <a name="section-MethodDetails"></a>
381 <table class="details" border="1" cellpadding="3"
382 cellspacing="0" width="100%" bgcolor="white">
383 <tr bgcolor="#70b0f0" class="table-header">
384 <td colspan="2" class="table-header">
385 <table border="0" cellpadding="0" cellspacing="0" width="100%">
387 <td align="left"><span class="table-header">Method Details</span></td>
388 <td align="right" valign="top"
389 ><span class="options">[<a href="#section-MethodDetails"
390 class="privatelink" onclick="toggle_private();"
391 >hide private</a>]</span></td>
397 <a name="__init__"></a>
399 <table class="details" border="1" cellpadding="3"
400 cellspacing="0" width="100%" bgcolor="white">
402 <table width="100%" cellpadding="0" cellspacing="0" border="0">
403 <tr valign="top"><td>
404 <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
405 <span class="sig-arg">index</span>)</span>
406 <br /><em class="fname">(Constructor)</em>
408 </td><td align="right" valign="top"
409 ><span class="codelink"><a href="lxml.tests.test_css-pysrc.html#CSSTestCase.__init__">source code</a></span>
413 Create an instance of the class that will use the named test
414 method when executed. Raises a ValueError if the instance does
415 not have a method with the specified name.
419 <dd><em class="note">(inherited documentation)</em></dd>
424 <a name="shortDescription"></a>
426 <table class="details" border="1" cellpadding="3"
427 cellspacing="0" width="100%" bgcolor="white">
429 <table width="100%" cellpadding="0" cellspacing="0" border="0">
430 <tr valign="top"><td>
431 <h3 class="epydoc"><span class="sig"><span class="sig-name">shortDescription</span>(<span class="sig-arg">self</span>)</span>
433 </td><td align="right" valign="top"
434 ><span class="codelink"><a href="lxml.tests.test_css-pysrc.html#CSSTestCase.shortDescription">source code</a></span>
438 <p>Returns a one-line description of the test, or None if no
439 description has been provided.</p>
440 <p>The default implementation of this method returns the first line of
441 the specified test method's docstring.</p>
444 unittest.case.TestCase.shortDescription
445 <dd><em class="note">(inherited documentation)</em></dd>
451 <!-- ==================== CLASS VARIABLE DETAILS ==================== -->
452 <a name="section-ClassVariableDetails"></a>
453 <table class="details" border="1" cellpadding="3"
454 cellspacing="0" width="100%" bgcolor="white">
455 <tr bgcolor="#70b0f0" class="table-header">
456 <td colspan="2" class="table-header">
457 <table border="0" cellpadding="0" cellspacing="0" width="100%">
459 <td align="left"><span class="table-header">Class Variable Details</span></td>
460 <td align="right" valign="top"
461 ><span class="options">[<a href="#section-ClassVariableDetails"
462 class="privatelink" onclick="toggle_private();"
463 >hide private</a>]</span></td>
469 <a name="selectors"></a>
471 <table class="details" border="1" cellpadding="3"
472 cellspacing="0" width="100%" bgcolor="white">
474 <h3 class="epydoc">selectors</h3>
480 <dd><table><tr><td><pre class="variable">
481 <code class="variable-group">[</code><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">*</code><code class="variable-quote">'</code><code class="variable-op">, </code>246<code class="variable-group">)</code><code class="variable-op">,</code>
482 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">div:only-child</code><code class="variable-quote">'</code><code class="variable-op">, </code>22<code class="variable-group">)</code><code class="variable-op">,</code>
483 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">div:contains(CELIA)</code><code class="variable-quote">'</code><code class="variable-op">, </code>30<code class="variable-group">)</code><code class="variable-op">,</code>
484 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">div:nth-child(even)</code><code class="variable-quote">'</code><code class="variable-op">, </code>106<code class="variable-group">)</code><code class="variable-op">,</code>
485 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">div:nth-child(2n)</code><code class="variable-quote">'</code><code class="variable-op">, </code>106<code class="variable-group">)</code><code class="variable-op">,</code>
486 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">div:nth-child(odd)</code><code class="variable-quote">'</code><code class="variable-op">, </code>137<code class="variable-group">)</code><code class="variable-op">,</code>
487 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">div:nth-child(2n+1)</code><code class="variable-quote">'</code><code class="variable-op">, </code>137<code class="variable-group">)</code><code class="variable-op">,</code>
488 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">div:nth-child(n)</code><code class="variable-quote">'</code><code class="variable-op">, </code>243<code class="variable-group">)</code><code class="variable-op">,</code>
489 <code class="variable-ellipsis">...</code>
490 </pre></td></tr></table>
496 <!-- ==================== NAVIGATION BAR ==================== -->
497 <table class="navbar" border="0" width="100%" cellpadding="0"
498 bgcolor="#a0c0ff" cellspacing="0">
501 <th> <a
502 href="lxml-module.html">Home</a> </th>
505 <th> <a
506 href="module-tree.html">Trees</a> </th>
509 <th> <a
510 href="identifier-index.html">Indices</a> </th>
513 <th> <a
514 href="help.html">Help</a> </th>
516 <!-- Project homepage -->
517 <th class="navbar" align="right" width="100%">
518 <table border="0" cellpadding="0" cellspacing="0">
519 <tr><th class="navbar" align="center"
520 ><a class="navbar" target="_top" href="/">lxml API</a></th>
524 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
526 <td align="left" class="footer">
527 Generated by Epydoc 3.0.1 on Tue Jul 31 10:14:19 2012
529 <td align="right" class="footer">
530 <a target="mainFrame" href="http://epydoc.sourceforge.net"
531 >http://epydoc.sourceforge.net</a>
536 <script type="text/javascript">
538 // Private objects are initially displayed (because if
539 // javascript is turned off then we want them to be
540 // visible); but by default, we want to hide them. So hide
541 // them unless we have a cookie that says to show them.