mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-36743: __get__ is sometimes called without the owner argument (#12992)
This commit is contained in:
parent
84125fed2a
commit
0dac68f1e5
5 changed files with 24 additions and 13 deletions
|
@ -2804,7 +2804,7 @@ class PropertyMock(Mock):
|
|||
def _get_child_mock(self, /, **kwargs):
|
||||
return MagicMock(**kwargs)
|
||||
|
||||
def __get__(self, obj, obj_type):
|
||||
def __get__(self, obj, obj_type=None):
|
||||
return self()
|
||||
def __set__(self, obj, val):
|
||||
self(val)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue