summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_minidom.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_minidom.py')
-rw-r--r--Lib/test/test_minidom.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
index d06a83d..05df6e9 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -49,8 +49,14 @@ class MinidomTest(unittest.TestCase):
t = node.wholeText
self.confirm(t == s, "looking for %r, found %r" % (s, t))
- def testParseFromFile(self):
- with open(tstfile) as file:
+ def testParseFromBinaryFile(self):
+ with open(tstfile, 'rb') as file:
+ dom = parse(file)
+ dom.unlink()
+ self.confirm(isinstance(dom, Document))
+
+ def testParseFromTextFile(self):
+ with open(tstfile, 'r', encoding='iso-8859-1') as file:
dom = parse(file)
dom.unlink()
self.confirm(isinstance(dom, Document))