summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-02-08 21:31:47 (GMT)
committerFred Drake <fdrake@acm.org>2002-02-08 21:31:47 (GMT)
commit8ce1cd34ef5f8ba784a8d7677dc89e135676b8f3 (patch)
treed34c22b7b87d0f3677ad4a2c2994ee0fdf825b9c
parent68726f5384167f33be42984510df83a8df82e149 (diff)
downloadcpython-8ce1cd34ef5f8ba784a8d7677dc89e135676b8f3.zip
cpython-8ce1cd34ef5f8ba784a8d7677dc89e135676b8f3.tar.gz
cpython-8ce1cd34ef5f8ba784a8d7677dc89e135676b8f3.tar.bz2
Added regression test for start()/stop() returning bogus NULL.
-rw-r--r--Lib/test/test_hotshot.py10
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)