summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2023-05-16 16:55:57 -0700
committerGitHub <noreply@github.com>2023-05-16 16:55:57 -0700
commit2fd64161c1ae4a8930e9b6094804ac9976a9f2ad (patch)
treea01b165fca463ebfc230a445f445f1e258ff8dc6
parente837680f4b02ac74cfa8f1971771b4bfcd9634b1 (diff)
downloadansible-2fd64161c1ae4a8930e9b6094804ac9976a9f2ad.tar.gz
Fix hard-coded interpreter in test_async_wrapper (#80816)
-rw-r--r--test/units/modules/test_async_wrapper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/units/modules/test_async_wrapper.py b/test/units/modules/test_async_wrapper.py
index 70f8db8d66..dbaf6834cd 100644
--- a/test/units/modules/test_async_wrapper.py
+++ b/test/units/modules/test_async_wrapper.py
@@ -7,6 +7,7 @@ __metaclass__ = type
import os
import json
import shutil
+import sys
import tempfile
from ansible.modules import async_wrapper
@@ -17,11 +18,10 @@ class TestAsyncWrapper:
def test_run_module(self, monkeypatch):
def mock_get_interpreter(module_path):
- return ['/usr/bin/python']
+ return [sys.executable]
module_result = {'rc': 0}
module_lines = [
- '#!/usr/bin/python',
'import sys',
'sys.stderr.write("stderr stuff")',
"print('%s')" % json.dumps(module_result)