From 3f5787e7cd1ee16d549f8dd2d04364d0538afe7f Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Wed, 12 Jul 2017 15:18:39 +0800 Subject: leverage tox and pytest to execute unit test Change-Id: I20856e1b445587f0d8ee23e792793af863743252 Signed-off-by: SerenaFeng --- utils/test/testapi/test-requirements.txt | 6 ++++-- utils/test/testapi/tox.ini | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/utils/test/testapi/test-requirements.txt b/utils/test/testapi/test-requirements.txt index 645687b14..3bead7987 100644 --- a/utils/test/testapi/test-requirements.txt +++ b/utils/test/testapi/test-requirements.txt @@ -2,7 +2,9 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -mock -pytest coverage +mock>=2.0 nose>=1.3.1 +pytest +pytest-cov +pytest-mock diff --git a/utils/test/testapi/tox.ini b/utils/test/testapi/tox.ini index 65f5fb68d..d300f1a61 100644 --- a/utils/test/testapi/tox.ini +++ b/utils/test/testapi/tox.ini @@ -16,8 +16,11 @@ deps = -rtest-requirements.txt commands= py.test \ - --basetemp={envtmpdir} \ - {posargs} + --basetemp={envtmpdir} \ + --cov \ + --cov-report term-missing \ + --cov-report xml \ + {posargs} setenv= HOME = {envtmpdir} PYTHONPATH = {toxinidir} -- cgit 1.2.3-korg