summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xml_etree_c.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-13 11:18:49 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-13 11:18:49 (GMT)
commit13ba1a1c6571dad26e3030525556ec4b552b0865 (patch)
tree163e5b70a38db83142ace5dcec589bee0e0d074e /Lib/test/test_xml_etree_c.py
parentfce7b868076ad9ee7005273669b742c98214ec79 (diff)
downloadcpython-13ba1a1c6571dad26e3030525556ec4b552b0865.zip
cpython-13ba1a1c6571dad26e3030525556ec4b552b0865.tar.gz
cpython-13ba1a1c6571dad26e3030525556ec4b552b0865.tar.bz2
Move the xml test data to their own directory.
Diffstat (limited to 'Lib/test/test_xml_etree_c.py')
-rw-r--r--Lib/test/test_xml_etree_c.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_xml_etree_c.py b/Lib/test/test_xml_etree_c.py
index 7e978de..78a6a92 100644
--- a/Lib/test/test_xml_etree_c.py
+++ b/Lib/test/test_xml_etree_c.py
@@ -22,13 +22,18 @@ def test_main():
test_support.run_doctest(test_xml_etree_c, verbosity=True)
# Assign the C implementation before running the doctests
+ # Patch the __name__, to prevent confusion with the pure Python test
pyET = test_xml_etree.ET
+ py__name__ = test_xml_etree.__name__
test_xml_etree.ET = cET
+ if __name__ != '__main__':
+ test_xml_etree.__name__ = __name__
try:
# Run the same test suite as xml.etree.ElementTree
test_xml_etree.test_main(module_name='xml.etree.cElementTree')
finally:
test_xml_etree.ET = pyET
+ test_xml_etree.__name__ = py__name__
if __name__ == '__main__':
test_main()