Lines Matching defs:atexit
1 import atexit
12 # Run _test_atexit.py in a subprocess since it calls atexit._clear()
20 import atexit
25 atexit.register(f, "one")
26 atexit.register(f, "two")
33 # bpo-42639: It is safe to have more than one atexit instance.
36 import atexit as atexit1
37 del sys.modules['atexit']
38 import atexit as atexit2
39 del sys.modules['atexit']
55 # This test shows a leak in refleak mode if atexit doesn't
58 n = atexit._ncallbacks()
60 import atexit
63 atexit.register(f)
64 del atexit
68 self.assertEqual(atexit._ncallbacks(), n)
71 # Similar to the above, but with a refcycle through the atexit
73 n = atexit._ncallbacks()
75 import atexit
78 atexit.register(f)
79 atexit.__atexit = atexit
83 self.assertEqual(atexit._ncallbacks(), n)
94 import atexit
97 atexit.register(callback)