Kaydet (Commit) 7fadcabd authored tarafından Guido van Rossum's avatar Guido van Rossum

Add a test for the 'closed' attribute on the C-profiler object.

üst ed375e18
......@@ -63,8 +63,11 @@ class HotShotTestCase(unittest.TestCase):
def run_test(self, callable, events, profiler=None):
if profiler is None:
profiler = self.new_profiler()
self.failUnless(not profiler._prof.closed)
profiler.runcall(callable)
self.failUnless(not profiler._prof.closed)
profiler.close()
self.failUnless(profiler._prof.closed)
self.check_events(events)
def test_addinfo(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment