diff options
author | Guido van Rossum <guido@python.org> | 2001-10-24 20:42:55 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-10-24 20:42:55 (GMT) |
commit | e2ae77b8b8a62e648bb1864a9b36ef3280984404 (patch) | |
tree | e03ad6f126a16529b2fb43671903e357bcb05835 /Lib/test/test_sax.py | |
parent | c6ac8a78f668123ec5c2c3d5a824e7886e9a1c60 (diff) | |
download | cpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.zip cpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.tar.gz cpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.tar.bz2 |
SF patch #474590 -- RISC OS support
Diffstat (limited to 'Lib/test/test_sax.py')
-rw-r--r-- | Lib/test/test_sax.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py index dcf57d4..32b7609 100644 --- a/Lib/test/test_sax.py +++ b/Lib/test/test_sax.py @@ -13,6 +13,7 @@ from xml.sax.expatreader import create_parser from xml.sax.xmlreader import InputSource, AttributesImpl, AttributesNSImpl from cStringIO import StringIO from test_support import verify, verbose, TestFailed, findfile +import os # ===== Utilities @@ -228,7 +229,7 @@ def test_expat_file(): xmlgen = XMLGenerator(result) parser.setContentHandler(xmlgen) - parser.parse(open(findfile("test.xml"))) + parser.parse(open(findfile("test"+os.extsep+"xml"))) return result.getvalue() == xml_test_out @@ -349,7 +350,7 @@ def test_expat_nsattrs_wattr(): # ===== InputSource support -xml_test_out = open(findfile("test.xml.out")).read() +xml_test_out = open(findfile("test"+os.extsep+"xml"+os.extsep+"out")).read() def test_expat_inpsource_filename(): parser = create_parser() @@ -357,7 +358,7 @@ def test_expat_inpsource_filename(): xmlgen = XMLGenerator(result) parser.setContentHandler(xmlgen) - parser.parse(findfile("test.xml")) + parser.parse(findfile("test"+os.extsep+"xml")) return result.getvalue() == xml_test_out @@ -367,7 +368,7 @@ def test_expat_inpsource_sysid(): xmlgen = XMLGenerator(result) parser.setContentHandler(xmlgen) - parser.parse(InputSource(findfile("test.xml"))) + parser.parse(InputSource(findfile("test"+os.extsep+"xml"))) return result.getvalue() == xml_test_out @@ -378,7 +379,7 @@ def test_expat_inpsource_stream(): parser.setContentHandler(xmlgen) inpsrc = InputSource() - inpsrc.setByteStream(open(findfile("test.xml"))) + inpsrc.setByteStream(open(findfile("test"+os.extsep+"xml"))) parser.parse(inpsrc) return result.getvalue() == xml_test_out @@ -625,9 +626,9 @@ def make_test_output(): xmlgen = XMLGenerator(result) parser.setContentHandler(xmlgen) - parser.parse(findfile("test.xml")) + parser.parse(findfile("test"+os.extsep+"xml")) - outf = open(findfile("test.xml.out"), "w") + outf = open(findfile("test"+os.extsep+"xml"+os.extsep+"out"), "w") outf.write(result.getvalue()) outf.close() |