MCPcopy Index your code
hub / github.com/python/cpython / test_bound_methods

Method test_bound_methods

Lib/test/_test_atexit.py:111–119  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

109 self.assertEqual(a[0], -1)
110
111 def test_bound_methods(self):
112 l = []
113 atexit.register(l.append, 5)
114 atexit._run_exitfuncs()
115 self.assertEqual(l, [5])
116
117 atexit.unregister(l.append)
118 atexit._run_exitfuncs()
119 self.assertEqual(l, [5])
120
121 def test_atexit_with_unregistered_function(self):
122 # See bpo-46025 for more info

Callers

nothing calls this directly

Calls 3

registerMethod · 0.45
assertEqualMethod · 0.45
unregisterMethod · 0.45

Tested by

no test coverage detected