diff options
author | Fred Drake <fdrake@acm.org> | 2002-02-08 21:29:22 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-02-08 21:29:22 (GMT) |
commit | 4a02f9542f48dc3a22323983dfae7c70c7120796 (patch) | |
tree | 9ce7fbc57af1759fcd65c5ad04e4982a6ff47144 | |
parent | 2c146bfa28ae8dd50b86307d4c55baf026311d74 (diff) | |
download | cpython-4a02f9542f48dc3a22323983dfae7c70c7120796.zip cpython-4a02f9542f48dc3a22323983dfae7c70c7120796.tar.gz cpython-4a02f9542f48dc3a22323983dfae7c70c7120796.tar.bz2 |
Added regression test for start()/stop() returning bogus NULL.
-rw-r--r-- | Lib/test/test_hotshot.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_hotshot.py b/Lib/test/test_hotshot.py index 938687e..2a6816f 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) |