Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_htmlparser.HTMLParserTolerantTestCase Class Reference
Inheritance diagram for test.test_htmlparser.HTMLParserTolerantTestCase:
Inheritance graph
[legend]
Collaboration diagram for test.test_htmlparser.HTMLParserTolerantTestCase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def test_tolerant_parsing
def test_comma_between_attributes
def test_weird_chars_in_unquoted_attribute_values
def test_unescape_function

Public Attributes

 collector

Detailed Description

Definition at line 343 of file test_htmlparser.py.


Member Function Documentation

Definition at line 345 of file test_htmlparser.py.

00345 
00346     def setUp(self):
00347         self.collector = EventCollector(strict=False)

Here is the caller graph for this function:

Definition at line 362 of file test_htmlparser.py.

00362 
00363     def test_comma_between_attributes(self):
00364         self._run_check('<form action="/xxx.php?a=1&amp;b=2&amp", '
00365                         'method="post">', [
00366                             ('starttag', 'form',
00367                                 [('action', '/xxx.php?a=1&b=2&amp'),
00368                                  ('method', 'post')])],
00369                         collector = self.collector)

Here is the call graph for this function:

Definition at line 348 of file test_htmlparser.py.

00348 
00349     def test_tolerant_parsing(self):
00350         self._run_check('<html <html>te>>xt&a<<bc</a></html>\n'
00351                         '<img src="URL><//img></html</html>', [
00352                              ('data', '<html '),
00353                              ('starttag', 'html', []),
00354                              ('data', 'te>>xt'),
00355                              ('entityref', 'a'),
00356                              ('data', '<<bc'),
00357                              ('endtag', 'a'),
00358                              ('endtag', 'html'),
00359                              ('data', '\n<img src="URL><//img></html'),
00360                              ('endtag', 'html')],
00361                         collector = self.collector)

Here is the call graph for this function:

Definition at line 376 of file test_htmlparser.py.

00376 
00377     def test_unescape_function(self):
00378         p = html.parser.HTMLParser()
00379         self.assertEqual(p.unescape('&#bad;'),'&#bad;')
00380         self.assertEqual(p.unescape('&#0038;'),'&')
00381 

Here is the call graph for this function:

Definition at line 370 of file test_htmlparser.py.

00370 
00371     def test_weird_chars_in_unquoted_attribute_values(self):
00372         self._run_check('<form action=bogus|&#()value>', [
00373                             ('starttag', 'form',
00374                                 [('action', 'bogus|&#()value')])],
00375                         collector = self.collector)

Here is the call graph for this function:


Member Data Documentation

Definition at line 346 of file test_htmlparser.py.


The documentation for this class was generated from the following file: