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

Method test_many_attributes

Lib/test/test_class.py:940–948  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

938 self.assertEqual(getattr(obj, f"a{i}"), i)
939
940 def test_many_attributes(self):
941 class C: pass
942 c = C()
943 self.assertTrue(has_inline_values(c))
944 self.set_100(c)
945 self.assertFalse(has_inline_values(c))
946 self.check_100(c)
947 c = C()
948 self.assertTrue(has_inline_values(c))
949
950 def test_many_attributes_with_dict(self):
951 class C: pass

Callers

nothing calls this directly

Calls 5

set_100Method · 0.95
check_100Method · 0.95
assertTrueMethod · 0.80
assertFalseMethod · 0.80
CClass · 0.70

Tested by

no test coverage detected