mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
bpo-36743: __get__ is sometimes called without the owner argument (GH-12992) (GH-15589)
(cherry picked from commit 0dac68f1e5
)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
This commit is contained in:
parent
0d45d50e42
commit
c71ae1a45b
5 changed files with 24 additions and 13 deletions
|
@ -2806,7 +2806,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