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

Method test_clear

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

Source from the content-addressed store, hash-verified

83 self.assertEqual(a[0], 128)
84
85 def test_clear(self):
86 a = [0]
87 def inc():
88 a[0] += 1
89
90 atexit.register(inc)
91 atexit._clear()
92 atexit._run_exitfuncs()
93
94 self.assertEqual(a[0], 0)
95
96 def test_unregister(self):
97 a = [0]

Callers

nothing calls this directly

Calls 3

registerMethod · 0.45
_clearMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected