Package lxml :: Package tests :: Module test_htmlparser :: Class HtmlParserTestCase
[frames] | no frames]

Class HtmlParserTestCase

source code

               object --+        
                        |        
        unittest.TestCase --+    
                            |    
common_imports.HelperTestCase --+
                                |
                               HtmlParserTestCase

HTML parser test cases
Nested Classes

Inherited from unittest.TestCase: failureException

Instance Methods
 
tearDown(self)
Hook method for deconstructing the test fixture after testing it.
source code
 
test_module_HTML(self) source code
 
test_module_HTML_unicode(self) source code
 
test_module_HTML_pretty_print(self) source code
 
test_module_parse_html_error(self) source code
 
test_html_element_name_empty(self) source code
 
test_html_element_name_colon(self) source code
 
test_html_element_name_quote(self) source code
 
test_html_element_name_space(self) source code
 
test_html_subelement_name_empty(self) source code
 
test_html_subelement_name_colon(self) source code
 
test_html_subelement_name_quote(self) source code
 
test_html_subelement_name_space(self) source code
 
test_module_parse_html_norecover(self) source code
 
test_parse_encoding_8bit_explicit(self) source code
 
test_parse_encoding_8bit_override(self) source code
 
test_module_HTML_broken(self) source code
 
test_module_HTML_cdata(self) source code
 
test_module_HTML_access(self) source code
 
test_module_parse_html(self) source code
 
test_module_parse_html_filelike(self) source code
 
test_html_file_error(self) source code
 
test_default_parser_HTML_broken(self) source code
 
test_html_iterparse(self) source code
 
test_html_iterparse_file(self) source code

Inherited from common_imports.HelperTestCase: parse

Inherited from unittest.TestCase: __call__, __init__, __repr__, __str__, assertAlmostEqual, assertAlmostEquals, assertEqual, assertEquals, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertRaises, assertTrue, assert_, countTestCases, debug, defaultTestResult, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, setUp, shortDescription

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Class Variables
  etree
The lxml.etree module implements the extended ElementTree API for XML.
  html_str = '<html><head><title>test</title></head><body><h1>pa...
  html_str_pretty = '<html>\n<head><title>test</title></head>\n<...
  broken_html_str = '<html><head><title>test<body><h1>page title...
  uhtml_str = u'<html><head><title>test á</title></head><body>...

Inherited from common_imports.HelperTestCase: assertFalse

Properties

Inherited from object: __class__

Method Details

tearDown(self)

source code 
Hook method for deconstructing the test fixture after testing it.
Overrides: unittest.TestCase.tearDown
(inherited documentation)

Class Variable Details

etree

The lxml.etree module implements the extended ElementTree API for XML.
Value:
lxml.etree

html_str

Value:
'<html><head><title>test</title></head><body><h1>page title</h1></body\
></html>'

html_str_pretty

Value:
'''<html>
<head><title>test</title></head>
<body><h1>page title</h1></body>
</html>
'''

broken_html_str

Value:
'<html><head><title>test<body><h1>page title</h3></p></html>'

uhtml_str

Value:
u'<html><head><title>test á</title></head><body><h1>page á title</\
h1></body></html>'