Skip to content

Commit 7fadcab

Browse files
committed
Add a test for the 'closed' attribute on the C-profiler object.
1 parent ed375e1 commit 7fadcab

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_hotshot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ def check_events(self, expected):
6363
def run_test(self, callable, events, profiler=None):
6464
if profiler is None:
6565
profiler = self.new_profiler()
66+
self.failUnless(not profiler._prof.closed)
6667
profiler.runcall(callable)
68+
self.failUnless(not profiler._prof.closed)
6769
profiler.close()
70+
self.failUnless(profiler._prof.closed)
6871
self.check_events(events)
6972

7073
def test_addinfo(self):

0 commit comments

Comments
 (0)