Skip to content

Commit

Permalink
blacken
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Jan 7, 2023
1 parent e4eb37e commit 86af77c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# Set up icecream globally for convenience.
from icecream import install

install()


Expand Down
14 changes: 10 additions & 4 deletions tests/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,10 +677,14 @@ def _expect_NotImplementedError(self, context):
assert False, "Didn't raise NotImplementedError"

def single_value(self):
self._expect_NotImplementedError(MockContext(run=Result("meh"), repeat=False))
self._expect_NotImplementedError(
MockContext(run=Result("meh"), repeat=False)
)

def iterable(self):
self._expect_NotImplementedError(MockContext(run=[Result("meh")], repeat=False))
self._expect_NotImplementedError(
MockContext(run=[Result("meh")], repeat=False)
)

def mapping_to_single_value(self):
self._expect_NotImplementedError(
Expand Down Expand Up @@ -745,7 +749,9 @@ def sudo(self):

def wraps_run_and_sudo_with_Mock(self, clean_sys_modules):
sys.modules["mock"] = None # legacy
sys.modules["unittest.mock"] = Mock(Mock=Mock) # buffalo buffalo
mc = MockContext(run={"foo": Result("bar")}, sudo={"foo": Result("bar")})
sys.modules["unittest.mock"] = Mock(Mock=Mock) # buffalo buffalo
mc = MockContext(
run={"foo": Result("bar")}, sudo={"foo": Result("bar")}
)
assert isinstance(mc.run, Mock)
assert isinstance(mc.sudo, Mock)

0 comments on commit 86af77c

Please sign in to comment.