MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_unusual_getattro

Method test_unusual_getattro

Lib/test/test_super.py:463–473  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

461 self.assertEqual(C().method(), mysuper)
462
463 def test_unusual_getattro(self):
464 class MyType(type):
465 pass
466
467 def test(name):
468 mytype = MyType(name, (MyType,), {})
469 super(MyType, type(mytype)).__setattr__(mytype, "bar", 1)
470 self.assertEqual(mytype.bar, 1)
471
472 for _ in range(ADAPTIVE_WARMUP_DELAY):
473 test("foo1")
474
475 def test_reassigned_new(self):
476 class A:

Callers

nothing calls this directly

Calls 1

testFunction · 0.70

Tested by

no test coverage detected