summaryrefslogtreecommitdiff
path: root/Lib/test/test_minidom.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-13 12:41:48 +0000
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-13 12:41:48 +0000
commit1b51c3d4deb4e99fe8440ce9e6f82769e2a1b9be (patch)
tree1803f0b1f84dc7f33d9574d80ccac3bb14445eb8 /Lib/test/test_minidom.py
parent13ba1a1c6571dad26e3030525556ec4b552b0865 (diff)
downloadcpython-git-1b51c3d4deb4e99fe8440ce9e6f82769e2a1b9be.tar.gz
Do not chdir when running test_xml_etree, and enhance the findfile helper.
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 a8c0b10ac8..fad7f36f76 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -1,10 +1,8 @@
# test for xml.dom.minidom
-import os
-import sys
import pickle
from StringIO import StringIO
-from test.test_support import verbose, run_unittest
+from test.test_support import verbose, run_unittest, findfile
import unittest
import xml.dom
@@ -15,12 +13,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), "xmltestdata", "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