(self, obj_type)
| 8 | class TestStructSeq(unittest.TestCase): |
| 9 | # test PyTypeObject members |
| 10 | def check_structseq(self, obj_type): |
| 11 | # ob_refcnt |
| 12 | self.assertGreaterEqual(sys.getrefcount(obj_type), 1) |
| 13 | # tp_base |
| 14 | self.assertIsSubclass(obj_type, tuple) |
| 15 | # tp_bases |
| 16 | self.assertEqual(obj_type.__bases__, (tuple,)) |
| 17 | # tp_dict |
| 18 | self.assertIsInstance(obj_type.__dict__, types.MappingProxyType) |
| 19 | # tp_mro |
| 20 | self.assertEqual(obj_type.__mro__, (obj_type, tuple, object)) |
| 21 | # tp_name |
| 22 | self.assertIsInstance(type.__name__, str) |
| 23 | # tp_subclasses |
| 24 | self.assertEqual(obj_type.__subclasses__(), []) |
| 25 | |
| 26 | def test_sys_attrs(self): |
| 27 | for attr_name in ( |
no test coverage detected