diff options
Diffstat (limited to 'Lib/unittest/mock.py')
-rw-r--r-- | Lib/unittest/mock.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 50e4959655..a98decc2c9 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -2462,6 +2462,12 @@ class _Call(tuple): return _Call(name=name, parent=self, from_kall=False) + def __getattribute__(self, attr): + if attr in tuple.__dict__: + raise AttributeError + return tuple.__getattribute__(self, attr) + + def count(self, /, *args, **kwargs): return self.__getattr__('count')(*args, **kwargs) |