From 5185a0265cdcf5fb4b29aff41712a7da3b9ff2c6 Mon Sep 17 00:00:00 2001 From: jianghua wang Date: Thu, 1 Jun 2017 11:12:07 +0100 Subject: [PATCH] Fix coverage test errors in os-xenapi Change-Id: I9fe88a7dfd1bcdb023e14475bc1344013abbdb66 --- tox.ini | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 42e0646..889c383 100644 --- a/tox.ini +++ b/tox.ini @@ -27,10 +27,14 @@ commands = flake8 {posargs} commands = {posargs} [testenv:cover] +# Use python2.7 explicitly so that it's compatible with python2.4 used for plugins. +basepython=/usr/bin/python2.7 commands = coverage erase find . -type f -name "*.pyc" -delete - python setup.py testr --coverage --testr-args='{posargs}' + coverage run -m unittest discover + coverage report + coverage html [testenv:docs] commands = python setup.py build_sphinx