Skip to content

Commit 4f8eaaa

Browse files
committed
Address review: remove xmltestdata/ dir
1 parent 13fdbc7 commit 4f8eaaa

File tree

69 files changed

+12
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+12
-15
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Lib/test/decimaltestdata/*.decTest noeol
2929
Lib/test/test_email/data/*.txt noeol
3030
Lib/test/test_importlib/resources/data01/* noeol
3131
Lib/test/test_importlib/resources/namespacedata01/* noeol
32-
Lib/test/test_xml/xmltestdata/* noeol
32+
Lib/test/test_xml/*.xml noeol
3333

3434
# Shell scripts should have LF even on Windows because of Cygwin
3535
Lib/venv/scripts/common/activate text eol=lf

Doc/license.rst

Lines changed: 1 addition & 1 deletion

Lib/test/support/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,6 @@ def findfile(filename, subdir=None):
613613
if os.path.isabs(filename):
614614
return filename
615615
if subdir is not None:
616-
if not isinstance(subdir, str):
617-
subdir = os.path.join(*subdir)
618616
filename = os.path.join(subdir, filename)
619617
path = [TEST_HOME_DIR] + sys.path
620618
for dn in path:
File renamed without changes.

Lib/test/test_xml/test_minidom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from xml.parsers.expat import ExpatError
1414

1515

16-
tstfile = support.findfile("test.xml", subdir=("test_xml", "xmltestdata"))
16+
tstfile = support.findfile("test.xml", subdir="test_xml")
1717
sample = ("<?xml version='1.0' encoding='us-ascii'?>\n"
1818
"<!DOCTYPE doc PUBLIC 'http://xml.python.org/public'"
1919
" 'http://xml.python.org/system' [\n"

Lib/test/test_xml/test_pulldom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from test.support import findfile
1010

1111

12-
tstfile = findfile("test.xml", subdir=("test_xml", "xmltestdata"))
12+
tstfile = findfile("test.xml", subdir="test_xml")
1313

1414
# A handy XML snippet, containing attributes, a namespace prefix, and a
1515
# self-closing tag:

Lib/test/test_xml/test_sax.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
from test.support.os_helper import FakePath, TESTFN
2929

3030

31-
TEST_XMLFILE = findfile("test.xml", subdir=("test_xml", "xmltestdata"))
32-
TEST_XMLFILE_OUT = findfile("test.xml.out", subdir=("test_xml", "xmltestdata"))
31+
TEST_XMLFILE = findfile("test.xml", subdir="test_xml")
32+
TEST_XMLFILE_OUT = findfile("test.xml.out", subdir="test_xml")
3333
try:
3434
TEST_XMLFILE.encode("utf-8")
3535
TEST_XMLFILE_OUT.encode("utf-8")

Lib/test/test_xml/test_xml_etree.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
pyET = None
3838
ET = None
3939

40-
SIMPLE_XMLFILE = findfile("simple.xml", subdir=("test_xml", "xmltestdata"))
40+
SIMPLE_XMLFILE = findfile("simple.xml", subdir="test_xml")
4141
try:
4242
SIMPLE_XMLFILE.encode("utf-8")
4343
except UnicodeEncodeError:
4444
raise unittest.SkipTest("filename is not encodable to utf8")
45-
SIMPLE_NS_XMLFILE = findfile("simple-ns.xml", subdir=("test_xml", "xmltestdata"))
46-
UTF8_BUG_XMLFILE = findfile("expat224_utf8_bug.xml", subdir=("test_xml", "xmltestdata"))
45+
SIMPLE_NS_XMLFILE = findfile("simple-ns.xml", subdir="test_xml")
46+
UTF8_BUG_XMLFILE = findfile("expat224_utf8_bug.xml", subdir="test_xml")
4747

4848
SAMPLE_XML = """\
4949
<body>
@@ -4088,13 +4088,13 @@ def test_c14n_exclusion(self):
40884088

40894089
#
40904090
# basic method=c14n tests from the c14n 2.0 specification. uses
4091-
# test files under xmltestdata/c14n-20.
4091+
# test files under test_xml/c14n-20.
40924092

40934093
# note that this uses generated C14N versions of the standard ET.write
40944094
# output, not roundtripped C14N (see above).
40954095

40964096
def test_xml_c14n2(self):
4097-
datadir = findfile("c14n-20", subdir=("test_xml", "xmltestdata"))
4097+
datadir = findfile("c14n-20", subdir="test_xml")
40984098
full_path = partial(os.path.join, datadir)
40994099

41004100
files = [filename[:-4] for filename in sorted(os.listdir(datadir))

Makefile.pre.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,8 +2318,7 @@ TESTSUBDIRS= idlelib/idle_test \
23182318
test/tracedmodules \
23192319
test/typinganndata \
23202320
test/test_xml \
2321-
test/test_xml/xmltestdata \
2322-
test/test_xml/xmltestdata/c14n-20
2321+
test/test_xml/c14n-20
23232322

23242323
COMPILEALL_OPTS=-j0
23252324

0 commit comments

Comments
 (0)