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 ab3d962
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,5 +358,7 @@ 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 ab3d962

Please sign in to comment.