1 # xml.etree test for cElementTree
3 from test
import test_support
5 cET
= test_support
.import_module('xml.etree.cElementTree')
8 # cElementTree specific tests
14 >>> from xml.etree import cElementTree
19 from test
import test_xml_etree
, test_xml_etree_c
21 # Run the tests specific to the C implementation
22 test_support
.run_doctest(test_xml_etree_c
, verbosity
=True)
24 # Assign the C implementation before running the doctests
25 # Patch the __name__, to prevent confusion with the pure Python test
26 pyET
= test_xml_etree
.ET
27 py__name__
= test_xml_etree
.__name
__
28 test_xml_etree
.ET
= cET
29 if __name__
!= '__main__':
30 test_xml_etree
.__name
__ = __name__
32 # Run the same test suite as xml.etree.ElementTree
33 test_xml_etree
.test_main(module_name
='xml.etree.cElementTree')
35 test_xml_etree
.ET
= pyET
36 test_xml_etree
.__name
__ = py__name__
38 if __name__
== '__main__':