summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xml_etree.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-10-12 00:54:14 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-10-12 00:54:14 (GMT)
commit6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7 (patch)
treee731290ba41ff9208385bebbe402282ecbbd682f /Lib/test/test_xml_etree.py
parent983b1434bda1819864fb5d82248f249358a4c22d (diff)
downloadcpython-6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7.zip
cpython-6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7.tar.gz
cpython-6b4883dec0b7f6c5ede45dca861f5dc0e4ff2be7.tar.bz2
PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.
Diffstat (limited to 'Lib/test/test_xml_etree.py')
-rw-r--r--Lib/test/test_xml_etree.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index 40c2291..4dd8d22 100644
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -1339,7 +1339,7 @@ def xinclude_loader(href, parse="xml", encoding=None):
try:
data = XINCLUDE[href]
except KeyError:
- raise IOError("resource not found")
+ raise OSError("resource not found")
if parse == "xml":
from xml.etree.ElementTree import XML
return XML(data)
@@ -1404,7 +1404,7 @@ def xinclude():
>>> document = xinclude_loader("C5.xml")
>>> ElementInclude.include(document, xinclude_loader)
Traceback (most recent call last):
- IOError: resource not found
+ OSError: resource not found
>>> # print(serialize(document)) # C5
"""
@@ -1611,7 +1611,7 @@ def bug_xmltoolkit55():
class ExceptionFile:
def read(self, x):
- raise IOError
+ raise OSError
def xmltoolkit60():
"""
@@ -1619,7 +1619,7 @@ def xmltoolkit60():
Handle crash in stream source.
>>> tree = ET.parse(ExceptionFile())
Traceback (most recent call last):
- IOError
+ OSError
"""