(self)
| 169 | |
| 170 | @support.cpython_only |
| 171 | def test_cfunction(self): |
| 172 | _testcapi = import_helper.import_module("_testcapi") |
| 173 | create_cfunction = _testcapi.create_cfunction |
| 174 | f = create_cfunction() |
| 175 | wr = weakref.ref(f) |
| 176 | self.assertIs(wr(), f) |
| 177 | del f |
| 178 | self.assertIsNone(wr()) |
| 179 | self.check_basic_ref(create_cfunction) |
| 180 | self.check_basic_callback(create_cfunction) |
| 181 | |
| 182 | def test_multiple_callbacks(self): |
| 183 | o = C() |
nothing calls this directly
no test coverage detected