From: Guido van Rossum Date: Wed, 17 Jul 2002 16:12:53 +0000 (+0000) Subject: Add a test for the 'closed' attribute on the C-profiler object. X-Git-Tag: v2.3c1~4971 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7fadcabdeed67ed633e50f282052d970030dce11;p=python Add a test for the 'closed' attribute on the C-profiler object. --- diff --git a/Lib/test/test_hotshot.py b/Lib/test/test_hotshot.py index 2a6816f2ef..ebd2aaa115 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):