summaryrefslogtreecommitdiff
path: root/test/runner/lib/util.py
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2017-04-27 11:21:11 +0800
committerGitHub <noreply@github.com>2017-04-27 11:21:11 +0800
commitd662f6f0db408455c9030d3910e9b183fd54b797 (patch)
treebd4d9ce0100ee34e4d7ceee80ea0dd686c8cd3bc /test/runner/lib/util.py
parent51e3390333743e43fe9ac3d5add780b9d7ef5b6c (diff)
downloadansible-d662f6f0db408455c9030d3910e9b183fd54b797.tar.gz
Fix bugs in ansible-test units command. (#24044)
* Handle old versions of coverage. * Handle old versions of setuptools. * Detect python version for docker/remote units. * Add sanity override for test constraints.
Diffstat (limited to 'test/runner/lib/util.py')
-rw-r--r--test/runner/lib/util.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/runner/lib/util.py b/test/runner/lib/util.py
index 3607268e34..74942d4b57 100644
--- a/test/runner/lib/util.py
+++ b/test/runner/lib/util.py
@@ -477,6 +477,9 @@ class EnvironmentConfig(CommonConfig):
self.requirements = args.requirements # type: bool
+ if self.python == 'default':
+ self.python = '.'.join(str(i) for i in sys.version_info[:2])
+
self.python_version = self.python or '.'.join(str(i) for i in sys.version_info[:2])
self.delegate = self.tox or self.docker or self.remote