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

Method check_structseq

Lib/test/_test_embed_structseq.py:10–24  ·  view source on GitHub ↗
(self, obj_type)

Source from the content-addressed store, hash-verified

8class 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 (

Callers 2

test_sys_attrsMethod · 0.95
test_sys_funcsMethod · 0.95

Calls 4

assertGreaterEqualMethod · 0.80
assertIsSubclassMethod · 0.80
assertIsInstanceMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected