summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_pulldom.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_pulldom.py b/Lib/test/test_pulldom.py
index 4171526..b81a595 100644
--- a/Lib/test/test_pulldom.py
+++ b/Lib/test/test_pulldom.py
@@ -32,7 +32,9 @@ class PullDOMTestCase(unittest.TestCase):
# fragment.
# Test with a filename:
- list(pulldom.parse(tstfile))
+ handler = pulldom.parse(tstfile)
+ self.addCleanup(handler.stream.close)
+ list(handler)
# Test with a file object:
with open(tstfile, "rb") as fin: