]> granicus.if.org Git - python/commitdiff
Add a test for the 'closed' attribute on the C-profiler object.
authorGuido van Rossum <guido@python.org>
Wed, 17 Jul 2002 16:12:53 +0000 (16:12 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 17 Jul 2002 16:12:53 +0000 (16:12 +0000)
Lib/test/test_hotshot.py

index 2a6816f2efad6e8e1dda9b2a6b87258db81fb4db..ebd2aaa115381d473c597194402104699777e177 100644 (file)
@@ -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):