Lines Matching refs:atexit
4 import atexit
19 self.save_handlers = atexit._exithandlers
20 atexit._exithandlers = []
25 atexit._exithandlers = self.save_handlers
28 atexit.register(self.h1)
29 atexit.register(self.h4)
30 atexit.register(self.h4, 4, kw="abc")
31 atexit._run_exitfuncs()
36 atexit.register(lambda: 1, 0, 0, (x for x in (1,2)), 0, 0)
37 self.assertRaises(TypeError, atexit._run_exitfuncs)
40 atexit.register(self.h1)
41 atexit.register(self.h2)
42 atexit.register(self.h3)
43 atexit._run_exitfuncs()
50 reload(atexit)
52 atexit.register(self.h2)
53 atexit._run_exitfuncs()
59 atexit.register(self.raise1)
60 atexit.register(self.raise2)
61 self.assertRaises(TypeError, atexit._run_exitfuncs)
65 atexit.register(exit)
67 self.assertRaises(SystemExit, atexit._run_exitfuncs)