Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4a02f95

Browse files
committed
Added regression test for start()/stop() returning bogus NULL.
1 parent 2c146bf commit 4a02f95

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Lib/test/test_hotshot.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ def g():
9898
]
9999
self.run_test(g, events, self.new_profiler(lineevents=1))
100100

101+
def test_start_stop(self):
102+
# Make sure we don't return NULL in the start() and stop()
103+
# methods when there isn't an error. Bug in 2.2 noted by
104+
# Anthony Baxter.
105+
profiler = self.new_profiler()
106+
profiler.start()
107+
profiler.stop()
108+
profiler.close()
109+
os.unlink(self.logfn)
110+
101111

102112
def test_main():
103113
test_support.run_unittest(HotShotTestCase)

0 commit comments

Comments
 (0)