From bd76cadc73eef08210a7da348a187e91f7af595a Mon Sep 17 00:00:00 2001 From: "Nicholas H.Tollervey" Date: Thu, 15 Aug 2024 17:26:48 +0100 Subject: [PATCH] Black! --- tests/test_asyncmock.py | 4 +++- tests/test_mock.py | 2 +- umock.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_asyncmock.py b/tests/test_asyncmock.py index ce2fd1c..481ca25 100644 --- a/tests/test_asyncmock.py +++ b/tests/test_asyncmock.py @@ -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." diff --git a/tests/test_mock.py b/tests/test_mock.py index 180532f..89493a4 100644 --- a/tests/test_mock.py +++ b/tests/test_mock.py @@ -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." \ No newline at end of file + assert isinstance(m.foo(), Mock), "Returned object is not a Mock." diff --git a/umock.py b/umock.py index 616ca09..331631b 100644 --- a/umock.py +++ b/umock.py @@ -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.