(self)
| 94 | self.assertEqual(a[0], 0) |
| 95 | |
| 96 | def test_unregister(self): |
| 97 | a = [0] |
| 98 | def inc(): |
| 99 | a[0] += 1 |
| 100 | def dec(): |
| 101 | a[0] -= 1 |
| 102 | |
| 103 | for i in range(4): |
| 104 | atexit.register(inc) |
| 105 | atexit.register(dec) |
| 106 | atexit.unregister(inc) |
| 107 | atexit._run_exitfuncs() |
| 108 | |
| 109 | self.assertEqual(a[0], -1) |
| 110 | |
| 111 | def test_bound_methods(self): |
| 112 | l = [] |
nothing calls this directly
no test coverage detected