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

Method test_atexit

Lib/test/test_weakref.py:2267–2273  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2265 assert f4.atexit == True
2266
2267 def test_atexit(self):
2268 prog = ('from test.test_weakref import FinalizeTestCase;'+
2269 'FinalizeTestCase.run_in_child()')
2270 rc, out, err = script_helper.assert_python_ok('-c', prog)
2271 out = out.decode('ascii').splitlines()
2272 self.assertEqual(out, ['f4 foobar', 'f3 error', 'g1', 'f1 foobar'])
2273 self.assertTrue(b'ZeroDivisionError' in err)
2274
2275
2276class ModuleTestCase(unittest.TestCase):

Callers

nothing calls this directly

Calls 5

assert_python_okMethod · 0.80
assertTrueMethod · 0.80
splitlinesMethod · 0.45
decodeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected