Skip to content

Commit

Permalink
Use a kwarg in an otherwise confusing posarg spot
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Jul 5, 2021
1 parent 0f8003a commit 35fe47c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion fabric/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,9 @@ def create_session(self):
return channel

def _remote_runner(self):
return self.config.runners.remote(self, inline_env=self.inline_ssh_env)
return self.config.runners.remote(
context=self, inline_env=self.inline_ssh_env
)

@opens
def run(self, command, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions tests/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ def calls_Remote_run_with_command_and_kwargs_and_returns_its_result(
# .assert_called_with()) stopped working, apparently triggered by
# our code...somehow...after commit (roughly) 80906c7.
# And yet, .call_args_list and its brethren work fine. Wha?
Remote.assert_any_call(c, inline_env=False)
Remote.assert_any_call(context=c, inline_env=False)
remote.run.assert_has_calls(
[call("command"), call("command", warn=True, hide="stderr")]
)
Expand Down Expand Up @@ -1002,7 +1002,7 @@ def basic_invocation(self, Remote, client):
# Remote.return_value is two different Mocks now, despite Remote's
# own Mock having the same ID here and in code under test. WTF!!)
expected = [
call(cxn, inline_env=False),
call(context=cxn, inline_env=False),
call().run(cmd, watchers=ANY),
]
assert Remote.mock_calls == expected
Expand Down

0 comments on commit 35fe47c

Please sign in to comment.