Thomas Bechtold 2019-05-07 04:48:12 +00:00 committed by Git OBS Bridge
parent 16c14cc383
commit d4c923812c

View File

@ -13,31 +13,10 @@ build for python3. Due to that, no "python" executable is there.
test/unit/test_runner.py | 9 +++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/test/integration/test_runner.py b/test/integration/test_runner.py
index 7be961b..e13054d 100644
--- a/test/integration/test_runner.py
+++ b/test/integration/test_runner.py
@@ -5,6 +5,7 @@ import os
import re
import pytest
import six
+import sys
try:
from unittest.mock import MagicMock
except ImportError:
@@ -15,7 +16,7 @@ from ansible_runner.exceptions import AnsibleRunnerException
def test_password_prompt(rc):
- rc.command = ['python', '-c' 'from __future__ import print_function; import time; print(input("Password: "))']
+ rc.command = [sys.executable, '-c' 'from __future__ import print_function; import time; print(input("Password: "))']
rc.expect_passwords[re.compile(r'Password:\s*?$', re.M)] = '1234'
status, exitcode = Runner(config=rc).run()
assert status == 'successful'
diff --git a/test/unit/test_runner.py b/test/unit/test_runner.py
index e50d50c..ca6ef49 100644
--- a/test/unit/test_runner.py
+++ b/test/unit/test_runner.py
Index: ansible-runner-1.3.3/test/unit/test_runner.py
===================================================================
--- ansible-runner-1.3.3.orig/test/unit/test_runner.py
+++ ansible-runner-1.3.3/test/unit/test_runner.py
@@ -8,6 +8,7 @@ import mock
import pexpect
import pytest
@ -81,6 +60,3 @@ index e50d50c..ca6ef49 100644
rc.env = {'X_MY_ENV': value}
status, exitcode = Runner(config=rc).run()
assert status == 'successful'
--
2.21.0