Skip to content

Commit

Permalink
Black!
Browse files Browse the repository at this point in the history
  • Loading branch information
ntoll committed Aug 15, 2024
1 parent ab2dc50 commit bd76cad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/test_asyncmock.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,4 +420,6 @@ async def test_get_attribute_of_unknown_attribute_returns_mock():
assert isinstance(m.foo, AsyncMock), "Returned object is not an AsyncMock."
assert id(m.foo) == id(m.foo), "Returned object is not the same."
assert await m.foo() is await m.foo(), "Returned object is not the same."
assert isinstance(await m.foo(), AsyncMock), "Returned object is not a Mock."
assert isinstance(
await m.foo(), AsyncMock
), "Returned object is not a Mock."
2 changes: 1 addition & 1 deletion tests/test_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,4 @@ def test_get_attr_of_unknown_attribute_returns_mock():
assert isinstance(m.foo, Mock), "Returned object is not a Mock."
assert id(m.foo) == id(m.foo), "Returned object is not the same."
assert m.foo() is m.foo(), "Returned object is not the same."
assert isinstance(m.foo(), Mock), "Returned object is not a Mock."
assert isinstance(m.foo(), Mock), "Returned object is not a Mock."
2 changes: 1 addition & 1 deletion umock.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ class or instance) that acts as the specification for the mock
for name in self._spec:
# Create a new mock object for each attribute in the spec.
setattr(self, name, Mock())

if side_effect:
if type(side_effect) in (str, list, tuple, set, dict):
# If side_effect is an iterable then make it an iterator.
Expand Down

0 comments on commit bd76cad

Please sign in to comment.