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

Method test_update_as_decorator

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

Source from the content-addressed store, hash-verified

561 self.assertEqual(B.__abstractmethods__, set())
562
563 def test_update_as_decorator(self):
564 class A(metaclass=abc_ABCMeta):
565 @abc.abstractmethod
566 def foo(self):
567 pass
568
569 def class_decorator(cls):
570 cls.foo = lambda self: None
571 return cls
572
573 @abc.update_abstractmethods
574 @class_decorator
575 class B(A):
576 pass
577
578 B()
579 self.assertEqual(B.__abstractmethods__, set())
580
581 def test_update_non_abc(self):
582 class A:

Callers

nothing calls this directly

Calls 3

setFunction · 0.85
BClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected