return what, t, tdelta
if what == WHAT_EXIT:
- return what, self._pop(), tdelta
+ try:
+ return what, self._pop(), tdelta
+ except IndexError:
+ raise StopIteration
if what == WHAT_LINENO:
filename, firstlineno, funcname = self._stack[-1]
# Silence Py3k warning
hotshot = test_support.import_module('hotshot', deprecated=True)
from hotshot.log import ENTER, EXIT, LINE
+from hotshot import stats
def shortfilename(fn):
emptyfile.close()
gc.collect()
+ def test_load_stats(self):
+ def start(prof):
+ prof.start()
+ # Make sure stats can be loaded when start and stop of profiler
+ # are not executed in the same stack frame.
+ profiler = self.new_profiler()
+ start(profiler)
+ profiler.stop()
+ profiler.close()
+ stats.load(self.logfn)
+ os.unlink(self.logfn)
+
+
def test_main():
test_support.run_unittest(HotShotTestCase)
Extension Modules
-----------------
+- Issue #1019882: Fix IndexError when loading certain hotshot stats.
+
- Issue #9422: Fix memory leak when re-initializing a struct.Struct object.
- Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly