summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-12-15 22:16:00 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-12-15 22:16:00 (GMT)
commit360d8cfc9dc0c2c1e2ecb0dfc4cc340efceca017 (patch)
tree8b967494db33d3bd67b18a0970718a8190d660c0 /Lib/test
parent3fced65aa36f9b5f384f19418430c2dd20e044d6 (diff)
downloadcpython-360d8cfc9dc0c2c1e2ecb0dfc4cc340efceca017.zip
cpython-360d8cfc9dc0c2c1e2ecb0dfc4cc340efceca017.tar.gz
cpython-360d8cfc9dc0c2c1e2ecb0dfc4cc340efceca017.tar.bz2
Merged revisions 67797 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r67797 | amaury.forgeotdarc | 2008-12-15 22:47:57 +0100 (Mon, 15 Dec 2008) | 4 lines #3954: Fix error handling code in _hotshot.logreader Will port to 2.6. hotshot was deleted from python 3. ........
Diffstat (limited to 'Lib/test')
-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 2751b3f..35ca6aa 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)