Skip to content

Commit 5f1d0a8

Browse files
committed
Docstring updates.
1 parent 22fc337 commit 5f1d0a8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

umock.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,10 @@ def reset_mock(self):
9393
9494
This is useful for when you want to reuse a mock object.
9595
96-
The self._calls contains a list of tuples, each of which represents a
97-
call to the mock object. The tuple is in the form: (method_name, args,
98-
kwargs).
96+
The self._calls is a list of tuples, each of which represents a
97+
call to the mock object. Each tuple is in the form:
98+
99+
(method_name, args, kwargs)
99100
"""
100101
self._calls = []
101102

@@ -207,7 +208,7 @@ def __call__(self, *args, **kwargs):
207208
raise self.side_effect
208209
elif hasattr(self.side_effect, "__iter__"):
209210
return self.side_effect.pop(0)
210-
if hasattr(self, "return_value"):
211+
elif hasattr(self, "return_value"):
211212
return self.return_value
212213
else:
213214
return Mock()
@@ -242,6 +243,8 @@ class AsyncMock(Mock):
242243
"""
243244
A simple class for creating asynchronous mock objects. Inspired by (but not
244245
the same as) Python's own unittest.mock.AsyncMock class.
246+
247+
TODO: Finish this class.
245248
"""
246249

247250
...

0 commit comments

Comments
 (0)