Skip to content

Commit 00c24da

Browse files
committed
BE-4504 Fix minidom test to use newer expat
1 parent a8922cf commit 00c24da

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_minidom.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import xml.dom
1010
import xml.dom.minidom
1111
import xml.parsers.expat
12+
from xml.parsers.expat import ExpatError
1213

1314
from xml.dom.minidom import parse, Node, Document, parseString
1415
from xml.dom.minidom import getDOMImplementation
@@ -1051,8 +1052,8 @@ def testEncodings(self):
10511052

10521053
# Verify that character decoding errors raise exceptions instead
10531054
# of crashing
1054-
self.assertRaises(UnicodeDecodeError, parseString,
1055-
'<fran\xe7ais>Comment \xe7a va ? Tr\xe8s bien ?</fran\xe7ais>')
1055+
self.assertRaises(ExpatError, parseString,
1056+
'not well-formed (invalid token)')
10561057

10571058
doc.unlink()
10581059

0 commit comments

Comments
 (0)