Skip to content

Commit

Permalink
Use sys.executable when testing with -m fabric
Browse files Browse the repository at this point in the history
The current test case assumes /usr/bin/python is the current running
Python release, which it may not always be, so make use of
sys.executable to re-exec the interpreter.
  • Loading branch information
s-t-e-v-e-n-k committed May 17, 2022
1 parent f3e4cf8 commit f75968f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,5 +358,5 @@ def python_dash_m_acts_like_fab(self, capsys):
Paramiko .+
Invoke .+
""".strip()
output = run("python -m fabric --version", hide=True, in_stream=False)
output = run(sys.executable + " -m fabric --version", hide=True, in_stream=False)
assert re.match(expected_output, output.stdout)

0 comments on commit f75968f

Please sign in to comment.