(self)
| 448 | self.assertCallStack([('__delattr__', (testme, "cardinal"))]) |
| 449 | |
| 450 | def testHasAttrString(self): |
| 451 | import sys |
| 452 | from test.support import import_helper |
| 453 | _testlimitedcapi = import_helper.import_module('_testlimitedcapi') |
| 454 | |
| 455 | class A: |
| 456 | def __init__(self): |
| 457 | self.attr = 1 |
| 458 | |
| 459 | a = A() |
| 460 | self.assertEqual(_testlimitedcapi.object_hasattrstring(a, b"attr"), 1) |
| 461 | self.assertEqual(_testlimitedcapi.object_hasattrstring(a, b"noattr"), 0) |
| 462 | self.assertIsNone(sys.exception()) |
| 463 | |
| 464 | def testDel(self): |
| 465 | x = [] |
nothing calls this directly
no test coverage detected