summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-07-17 16:12:53 (GMT)
committerGuido van Rossum <guido@python.org>2002-07-17 16:12:53 (GMT)
commit7fadcabdeed67ed633e50f282052d970030dce11 (patch)
treeb814aae187bcf9df852df6207874a75221f78584
parented375e18d10d37bfea1769aa1fe69795df6cbc10 (diff)
downloadcpython-7fadcabdeed67ed633e50f282052d970030dce11.zip
cpython-7fadcabdeed67ed633e50f282052d970030dce11.tar.gz
cpython-7fadcabdeed67ed633e50f282052d970030dce11.tar.bz2
Add a test for the 'closed' attribute on the C-profiler object.
-rw-r--r--Lib/test/test_hotshot.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_hotshot.py b/Lib/test/test_hotshot.py
index 2a6816f..ebd2aaa 100644
--- a/Lib/test/test_hotshot.py
+++ b/Lib/test/test_hotshot.py
@@ -63,8 +63,11 @@ class HotShotTestCase(unittest.TestCase):
def run_test(self, callable, events, profiler=None):
if profiler is None:
profiler = self.new_profiler()
+ self.failUnless(not profiler._prof.closed)
profiler.runcall(callable)
+ self.failUnless(not profiler._prof.closed)
profiler.close()
+ self.failUnless(profiler._prof.closed)
self.check_events(events)
def test_addinfo(self):