]> granicus.if.org Git - python/commitdiff
Added regression test for start()/stop() returning bogus NULL.
authorFred Drake <fdrake@acm.org>
Fri, 8 Feb 2002 21:29:22 +0000 (21:29 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 8 Feb 2002 21:29:22 +0000 (21:29 +0000)
Lib/test/test_hotshot.py

index 938687ef78d5845bf04c9bddf8d5879bf482bbcb..2a6816f2efad6e8e1dda9b2a6b87258db81fb4db 100644 (file)
@@ -98,6 +98,16 @@ class HotShotTestCase(unittest.TestCase):
                   ]
         self.run_test(g, events, self.new_profiler(lineevents=1))
 
+    def test_start_stop(self):
+        # Make sure we don't return NULL in the start() and stop()
+        # methods when there isn't an error.  Bug in 2.2 noted by
+        # Anthony Baxter.
+        profiler = self.new_profiler()
+        profiler.start()
+        profiler.stop()
+        profiler.close()
+        os.unlink(self.logfn)
+
 
 def test_main():
     test_support.run_unittest(HotShotTestCase)