leverage tox and pytest to execute unit test 43/37243/6
authorSerenaFeng <feng.xiaowei@zte.com.cn>
Wed, 12 Jul 2017 07:18:39 +0000 (15:18 +0800)
committerSerenaFeng <feng.xiaowei@zte.com.cn>
Fri, 14 Jul 2017 09:31:36 +0000 (17:31 +0800)
Change-Id: I20856e1b445587f0d8ee23e792793af863743252
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
utils/test/testapi/test-requirements.txt
utils/test/testapi/tox.ini

index 645687b..3bead79 100644 (file)
@@ -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
index 65f5fb6..d300f1a 100644 (file)
@@ -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}