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

Method test_all_new_methods_are_called

Lib/test/test_abc.py:482–494  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

480 self.assertNotIsSubclass(C, (A,))
481
482 def test_all_new_methods_are_called(self):
483 class A(metaclass=abc_ABCMeta):
484 pass
485 class B(object):
486 counter = 0
487 def __new__(cls):
488 B.counter += 1
489 return super().__new__(cls)
490 class C(A, B):
491 pass
492 self.assertEqual(B.counter, 0)
493 C()
494 self.assertEqual(B.counter, 1)
495
496 def test_ABC_has___slots__(self):
497 self.assertHasAttr(abc.ABC, '__slots__')

Callers

nothing calls this directly

Calls 2

CClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected