From 0c3faa2e1c666d018427fb9e1a9d558ed32f3b52 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 4 Sep 2018 09:28:34 -0700 Subject: [PATCH] Fix ansible-test virtualenv use in import test. (cherry picked from commit 998badbda55e69413ee8b70349d782a177ddee73) --- test/runner/lib/sanity/import.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/runner/lib/sanity/import.py b/test/runner/lib/sanity/import.py index 9fbc127f0c2..60daeff79ec 100644 --- a/test/runner/lib/sanity/import.py +++ b/test/runner/lib/sanity/import.py @@ -67,7 +67,9 @@ class ImportTest(SanityMultipleVersion): remove_tree(virtual_environment_path) - cmd = ['virtualenv', virtual_environment_path, '--python', find_python(python_version), '--no-setuptools', '--no-wheel'] + python = find_python(python_version) + + cmd = [python, '-m', 'virtualenv', virtual_environment_path, '--python', python, '--no-setuptools', '--no-wheel'] if not args.coverage: cmd.append('--no-pip')