From 4a02f9542f48dc3a22323983dfae7c70c7120796 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 8 Feb 2002 21:29:22 +0000 Subject: [PATCH] Added regression test for start()/stop() returning bogus NULL. --- Lib/test/test_hotshot.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Lib/test/test_hotshot.py b/Lib/test/test_hotshot.py index 938687ef78..2a6816f2ef 100644 --- a/Lib/test/test_hotshot.py +++ b/Lib/test/test_hotshot.py @@ -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) -- 2.50.1