Package lxml :: Package tests :: Module test_elementtree :: Class ETreeTestCaseBase
[hide private]
[frames] | no frames]

Class ETreeTestCaseBase

source code

               object --+        
                        |        
        unittest.TestCase --+    
                            |    
common_imports.HelperTestCase --+
                                |
                               ETreeTestCaseBase
Known Subclasses:

Nested Classes [hide private]

Inherited from unittest.TestCase: failureException

Instance Methods [hide private]
 
setUp(self)
Hook method for setting up the test fixture before exercising it.
source code
 
tearDown(self)
Hook method for deconstructing the test fixture after testing it.
source code
 
getTestFilePath(self, name) source code
 
test_element(self) source code
 
test_tree(self) source code
 
buildNodes(self, element, children, depth) source code
 
test_simple(self) source code
 
test_subelement(self) source code
 
test_element_contains(self) source code
 
test_element_indexing_with_text(self) source code
 
test_element_indexing_with_text2(self) source code
 
test_element_indexing_only_text(self) source code
 
test_element_indexing_negative(self) source code
 
test_elementtree(self) source code
 
test_text(self) source code
 
test_text_empty(self) source code
 
test_text_other(self) source code
 
test_text_escape_in(self) source code
 
test_text_escape_out(self) source code
 
test_text_escape_tostring(self) source code
 
test_text_str_subclass(self) source code
 
test_tail(self) source code
 
test_tail_str_subclass(self) source code
 
test_ElementTree(self) source code
 
test_attributes(self) source code
 
test_attributes2(self) source code
 
test_attributes3(self) source code
 
test_attrib_clear(self) source code
 
test_attrib_set_clear(self) source code
 
test_attribute_update_dict(self) source code
 
test_attribute_update_sequence(self) source code
 
test_attribute_update_iter(self) source code
 
test_attribute_keys(self) source code
 
test_attribute_keys2(self) source code
 
test_attribute_items2(self) source code
 
test_attribute_keys_ns(self) source code
 
test_attribute_values(self) source code
 
test_attribute_values_ns(self) source code
 
test_attribute_items(self) source code
 
test_attribute_items_ns(self) source code
 
test_attribute_str(self) source code
 
test_attribute_has_key(self) source code
 
test_attribute_contains(self) source code
 
test_attribute_set(self) source code
 
test_XML(self) source code
 
test_XMLID(self) source code
 
test_fromstring(self) source code
 
test_iselement(self) source code
 
test_iteration(self) source code
 
test_iteration_empty(self) source code
 
test_iteration_text_only(self) source code
 
test_iteration_crash(self) source code
 
test_iteration_reversed(self) source code
 
test_iteration_subelement(self) source code
 
test_iteration_del_child(self) source code
 
test_iteration_double(self) source code
 
test_attribute_iterator(self) source code
 
test_findall(self) source code
 
test_findall_ns(self) source code
 
test_element_with_attributes_keywords(self) source code
 
test_element_with_attributes(self) source code
 
test_element_with_attributes_ns(self) source code
 
test_subelement_with_attributes(self) source code
 
test_subelement_with_attributes_ns(self) source code
 
test_write(self) source code
 
test_write_fail(self) source code
 
test_crash(self) source code
 
test_write_ElementTreeDoctest(self) source code
 
test_subelement_reference(self) source code
 
test_set_text(self) source code
 
test_set_text2(self) source code
 
test_set_text_none(self) source code
 
test_set_text_empty(self) source code
 
test_tail1(self) source code
 
test_tail_append(self) source code
 
test_tail_set_twice(self) source code
 
test_tail_set_none(self) source code
 
test_comment(self) source code
 
test_comment_text(self) source code
 
test_comment_whitespace(self) source code
 
test_comment_nonsense(self) source code
 
test_pi(self) source code
 
test_pi_nonsense(self) source code
 
test_setitem(self) source code
 
test_setitem2(self) source code
 
test_setitem_replace(self) source code
 
test_setitem_indexerror(self) source code
 
test_setitem_tail(self) source code
 
test_tag_write(self) source code
 
test_tag_reset_ns(self) source code
 
test_tag_reset_root_ns(self) source code
 
test_tag_str_subclass(self) source code
 
test_delitem(self) source code
 
test_del_insert(self) source code
 
test_del_setitem(self) source code
 
test_del_setslice(self) source code
 
test_replace_slice_tail(self) source code
 
test_delitem_tail(self) source code
 
test_clear(self) source code
 
test_clear_sub(self) source code
 
test_clear_tail(self) source code
 
test_insert(self) source code
 
test_insert_beyond_index(self) source code
 
test_insert_negative(self) source code
 
test_insert_tail(self) source code
 
test_remove(self) source code
 
test_remove_ns(self) source code
 
test_remove_nonexisting(self) source code
 
test_remove_tail(self) source code
 
test_getchildren(self) source code
 
test_makeelement(self) source code
 
test_getiterator(self) source code
 
test_getiterator_empty(self) source code
 
test_getiterator_filter(self) source code
 
test_getiterator_filter_all(self) source code
 
test_getiterator_filter_comment(self) source code
 
test_getiterator_filter_pi(self) source code
 
test_getiterator_with_text(self) source code
 
test_getiterator_filter_with_text(self) source code
 
test_attribute_manipulation(self) source code
 
test_getslice(self) source code
 
test_getslice_negative(self) source code
 
test_getslice_text(self) source code
 
test_comment_getitem_getslice(self) source code
 
test_delslice(self) source code
 
test_delslice_negative1(self) source code
 
test_delslice_negative2(self) source code
 
test_delslice_tail(self) source code
 
test_delslice_memory(self) source code
 
test_setslice(self) source code
 
test_setslice_tail(self) source code
 
test_setslice_negative(self) source code
 
test_setslice_end(self) source code
 
test_setslice_empty(self) source code
 
test_tail_elementtree_root(self) source code
 
test_elementtree_getiterator(self) source code
 
test_elementtree_getiterator_filter(self) source code
 
test_ns_access(self) source code
 
test_ns_access2(self) source code
 
test_ns_setting(self) source code
 
test_ns_tag_parse(self) source code
 
test_ns_attr(self) source code
 
test_ns_move(self) source code
 
test_ns_decl(self) source code
 
test_ns_decl_default(self) source code
 
test_ns_decl_root(self) source code
 
test_attribute_xmlns_move(self) source code
 
test_tostring(self) source code
 
test_tostring_element(self) source code
 
test_tostring_element_tail(self) source code
 
test_iterparse(self) source code
 
test_iterparse_file(self) source code
 
test_iterparse_start(self) source code
 
test_iterparse_start_end(self) source code
 
test_iterparse_clear(self) source code
 
test_iterparse_large(self) source code
 
test_iterparse_attrib_ns(self) source code
 
test_iterparse_getiterator(self) source code
 
test_parse_file(self) source code
 
test_parse_file_nonexistent(self) source code
 
test_parse_file_object(self) source code
 
test_parse_stringio(self) source code
 
test_parse_with_encoding(self) source code
 
test_encoding(self) source code
 
test_encoding_exact(self) source code
 
test_parse_file_encoding(self) source code
 
test_parse_file_object_encoding(self) source code
 
test_encoding_8bit_latin1(self) source code
 
_test_wrong_unicode_encoding(self) source code
 
test_encoding_write_default_encoding(self) source code
 
test_encoding_tostring(self) source code
 
test_encoding_tostring_unknown(self) source code
 
test_encoding_tostring_sub(self) source code
 
test_encoding_tostring_sub_tail(self) source code
 
test_encoding_tostring_default_encoding(self) source code
 
test_encoding_sub_tostring_default_encoding(self) source code
 
test_encoding_8bit_xml(self) source code
 
test_encoding_8bit_parse_stringio(self) source code
 
test_deepcopy_elementtree(self) source code
 
test_deepcopy(self) source code
 
test_deepcopy_tail(self) source code
 
test_deepcopy_subelement(self) source code
 
test_deepcopy_namespaces(self) source code
 
test_deepcopy_append(self) source code
 
test_shallowcopy(self) source code
 
test_shallowcopy_elementtree(self) source code
 
test_element_boolean(self) source code
 
test_multiple_elementrees(self) source code
 
test_qname(self) source code
 
test_qname_cmp(self) source code
 
_writeElement(self, element, encoding='us-ascii')
Write out element for comparison.
source code
 
_writeElementFile(self, element, encoding='us-ascii')
Write out element for comparison, using real file.
source code
 
assertXML(self, expected, element, encoding='us-ascii')
Writes element out and checks whether it is expected.
source code
 
assertEncodingDeclaration(self, result, encoding)
Checks if the result XML byte string specifies the encoding.
source code
 
_rootstring(self, tree) source code
 
_check_element_tree(self, tree) source code
 
_check_element(self, element) source code
 
_check_string(self, string) source code
 
_check_mapping(self, mapping) 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, shortDescription

Inherited from unittest.TestCase (private): _exc_info

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

Class Variables [hide private]
  etree = None

Inherited from common_imports.HelperTestCase: assertFalse

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setUp(self)

source code 

Hook method for setting up the test fixture before exercising it.

Overrides: unittest.TestCase.setUp
(inherited documentation)

tearDown(self)

source code 

Hook method for deconstructing the test fixture after testing it.

Overrides: unittest.TestCase.tearDown
(inherited documentation)

assertXML(self, expected, element, encoding='us-ascii')

source code 

Writes element out and checks whether it is expected.

Does this two ways; once using StringIO, once using a real file.

_rootstring(self, tree)

source code 
Overrides: common_imports.HelperTestCase._rootstring