mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Do not chdir when running test_xml_etree, and enhance the findfile helper.
This commit is contained in:
parent
13ba1a1c65
commit
1b51c3d4de
4 changed files with 12 additions and 27 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue