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

Method test_mixing_slot_wrappers

Lib/test/test_descr.py:5128–5135  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5126 self.assertRaises(RecursionError, repr, foo)
5127
5128 def test_mixing_slot_wrappers(self):
5129 class X(dict):
5130 __setattr__ = dict.__setitem__
5131 __neg__ = dict.copy
5132 x = X()
5133 x.y = 42
5134 self.assertEqual(x["y"], 42)
5135 self.assertEqual(x, -x)
5136
5137 def test_wrong_class_slot_wrapper(self):
5138 # Check bpo-37619: a wrapper descriptor taken from the wrong class

Callers

nothing calls this directly

Calls 2

XClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected