We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19af306 commit dee8055Copy full SHA for dee8055
umock.py
@@ -651,7 +651,8 @@ def __enter__(self):
651
If self.new is None, a new Mock object is created with the supplied
652
kwargs and bound to self.new before the target is replaced.
653
"""
654
- self.new = self.new or Mock(**self.kwargs)
+ if self.new is None:
655
+ self.new = Mock(**self.kwargs)
656
self._old = patch_target(self.target, self.new)
657
return self.new
658
0 commit comments