|
|
fdff70 |
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
|
|
|
fdff70 |
index ca0f0f7..eff4f52 100644
|
|
|
fdff70 |
--- a/Lib/test/test_minidom.py
|
|
|
fdff70 |
+++ b/Lib/test/test_minidom.py
|
|
|
fdff70 |
@@ -5,12 +5,14 @@ from StringIO import StringIO
|
|
|
fdff70 |
from test.test_support import verbose, run_unittest, findfile
|
|
|
fdff70 |
import unittest
|
|
|
fdff70 |
|
|
|
fdff70 |
+import pyexpat
|
|
|
fdff70 |
import xml.dom
|
|
|
fdff70 |
import xml.dom.minidom
|
|
|
fdff70 |
import xml.parsers.expat
|
|
|
fdff70 |
|
|
|
fdff70 |
from xml.dom.minidom import parse, Node, Document, parseString
|
|
|
fdff70 |
from xml.dom.minidom import getDOMImplementation
|
|
|
fdff70 |
+from xml.parsers.expat import ExpatError
|
|
|
fdff70 |
|
|
|
fdff70 |
|
|
|
fdff70 |
tstfile = findfile("test.xml", subdir="xmltestdata")
|
|
|
fdff70 |
@@ -1062,8 +1064,10 @@ class MinidomTest(unittest.TestCase):
|
|
|
fdff70 |
|
|
|
fdff70 |
# Verify that character decoding errors raise exceptions instead
|
|
|
fdff70 |
# of crashing
|
|
|
fdff70 |
- self.assertRaises(UnicodeDecodeError, parseString,
|
|
|
fdff70 |
- '<fran\xe7ais>Comment \xe7a va ? Tr\xe8s bien ?</fran\xe7ais>')
|
|
|
fdff70 |
+ self.assertRaises(ExpatError, parseString,
|
|
|
fdff70 |
+ '<fran\xe7ais></fran\xe7ais>')
|
|
|
fdff70 |
+ self.assertRaises(ExpatError, parseString,
|
|
|
fdff70 |
+ '<franais>Comment \xe7a va ? Tr\xe8s bien ?</franais>')
|
|
|
fdff70 |
|
|
|
fdff70 |
doc.unlink()
|
|
|
fdff70 |
|
|
|
fdff70 |
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
|
|
|
fdff70 |
index 4e161ca..bf92361 100644
|
|
|
fdff70 |
--- a/Lib/test/test_xml_etree.py
|
|
|
fdff70 |
+++ b/Lib/test/test_xml_etree.py
|
|
|
fdff70 |
@@ -1797,18 +1797,6 @@ def check_issue6233():
|
|
|
fdff70 |
|
|
|
fdff70 |
"""
|
|
|
fdff70 |
|
|
|
fdff70 |
-def check_issue3151():
|
|
|
fdff70 |
- """
|
|
|
fdff70 |
-
|
|
|
fdff70 |
- >>> e = ET.XML('<prefix:localname xmlns:prefix="${stuff}"/>')
|
|
|
fdff70 |
- >>> e.tag
|
|
|
fdff70 |
- '{${stuff}}localname'
|
|
|
fdff70 |
- >>> t = ET.ElementTree(e)
|
|
|
fdff70 |
- >>> ET.tostring(e)
|
|
|
fdff70 |
- '<ns0:localname xmlns:ns0="${stuff}" />'
|
|
|
fdff70 |
-
|
|
|
fdff70 |
- """
|
|
|
fdff70 |
-
|
|
|
fdff70 |
def check_issue6565():
|
|
|
fdff70 |
"""
|
|
|
fdff70 |
|