summaryrefslogtreecommitdiff
path: root/Lib/test/test_hotshot.py
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-12-15 21:47:57 +0000
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-12-15 21:47:57 +0000
commit31949b9108088b1ad0efd9d518029b6980b191e9 (patch)
tree7c544636e9bb4d88d8b8214e339f88e78be23257 /Lib/test/test_hotshot.py
parent68060013eaa13ddd26bf4eb804d3dce7b29813a9 (diff)
downloadcpython-git-31949b9108088b1ad0efd9d518029b6980b191e9.tar.gz
#3954: Fix error handling code in _hotshot.logreader
Will port to 2.6. hotshot was deleted from python 3.
Diffstat (limited to 'Lib/test/test_hotshot.py')
-rw-r--r--Lib/test/test_hotshot.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_hotshot.py b/Lib/test/test_hotshot.py
index 2751b3ffd4..35ca6aa7f7 100644
--- a/Lib/test/test_hotshot.py
+++ b/Lib/test/test_hotshot.py
@@ -3,6 +3,8 @@ import hotshot.log
import os
import pprint
import unittest
+import _hotshot
+import gc
from test import test_support
@@ -124,6 +126,10 @@ class HotShotTestCase(unittest.TestCase):
if os.path.exists(test_support.TESTFN):
os.remove(test_support.TESTFN)
+ def test_logreader_eof_error(self):
+ self.assertRaises((IOError, EOFError), _hotshot.logreader, ".")
+ gc.collect()
+
def test_main():
test_support.run_unittest(HotShotTestCase)