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

Method test_class_methods

Lib/test/test_genericalias.py:208–211  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

206 self.assertEqual(C.__class__, type)
207
208 def test_class_methods(self):
209 t = dict[int, None]
210 self.assertEqual(dict.fromkeys(range(2)), {0: None, 1: None}) # This works
211 self.assertEqual(t.fromkeys(range(2)), {0: None, 1: None}) # Should be equivalent
212
213 def test_no_chaining(self):
214 t = list[int]

Callers

nothing calls this directly

Calls 2

assertEqualMethod · 0.45
fromkeysMethod · 0.45

Tested by

no test coverage detected