summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_minidom.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-13 23:24:31 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-13 23:24:31 (GMT)
commitf15351d938e76c4b2a42a638825d67f108685140 (patch)
treed75a09f72c251d71a714f948f50392249bf91cd9 /Lib/test/test_minidom.py
parent9451a1c6ae14cc31ea88eaaf68d5a8f946b82831 (diff)
downloadcpython-f15351d938e76c4b2a42a638825d67f108685140.zip
cpython-f15351d938e76c4b2a42a638825d67f108685140.tar.gz
cpython-f15351d938e76c4b2a42a638825d67f108685140.tar.bz2
Merged revisions 78838-78839,78917,78919,78934,78937 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78838 | florent.xicluna | 2010-03-11 15:36:19 +0100 (jeu, 11 mar 2010) | 2 lines Issue #6472: The xml.etree package is updated to ElementTree 1.3. The cElementTree module is updated too. ........ r78839 | florent.xicluna | 2010-03-11 16:55:11 +0100 (jeu, 11 mar 2010) | 2 lines Fix repr of tree Element on windows. ........ r78917 | florent.xicluna | 2010-03-13 12:18:49 +0100 (sam, 13 mar 2010) | 2 lines Move the xml test data to their own directory. ........ r78919 | florent.xicluna | 2010-03-13 13:41:48 +0100 (sam, 13 mar 2010) | 2 lines Do not chdir when running test_xml_etree, and enhance the findfile helper. ........ r78934 | florent.xicluna | 2010-03-13 18:56:19 +0100 (sam, 13 mar 2010) | 2 lines Update some parts of the xml.etree documentation. ........ r78937 | florent.xicluna | 2010-03-13 21:30:15 +0100 (sam, 13 mar 2010) | 3 lines Add the keyword argument "method=None" to the .write() method and the tostring/tostringlist functions. Update the function, class and method signatures, according to the new convention. ........
Diffstat (limited to 'Lib/test/test_minidom.py')
-rw-r--r--Lib/test/test_minidom.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
index 0a0a663..606fada 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -1,9 +1,7 @@
# test for xml.dom.minidom
-import os
-import sys
import pickle
-from test.support import verbose, run_unittest
+from test.support import verbose, run_unittest, findfile
import unittest
import xml.dom
@@ -14,12 +12,8 @@ from xml.dom.minidom import parse, Node, Document, parseString
from xml.dom.minidom import getDOMImplementation
-if __name__ == "__main__":
- base = sys.argv[0]
-else:
- base = __file__
-tstfile = os.path.join(os.path.dirname(base), "test.xml")
-del base
+tstfile = findfile("test.xml", subdir="xmltestdata")
+
# The tests of DocumentType importing use these helpers to construct
# the documents to work with, since not all DOM builders actually