diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2017-07-12 15:18:39 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2017-07-14 17:31:36 +0800 |
commit | bba00ca773c4851de91ab19d34859b930b9e1960 (patch) | |
tree | 36f616cdfb08f01a09a2f375439c9d6e7b2ee1ed /testapi | |
parent | 6e0054da0279207486e9b8ee8d85adaffe859996 (diff) |
leverage tox and pytest to execute unit test
Change-Id: I20856e1b445587f0d8ee23e792793af863743252
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi')
-rw-r--r-- | testapi/test-requirements.txt | 6 | ||||
-rw-r--r-- | testapi/tox.ini | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/testapi/test-requirements.txt b/testapi/test-requirements.txt index 645687b..3bead79 100644 --- a/testapi/test-requirements.txt +++ b/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/testapi/tox.ini b/testapi/tox.ini index 65f5fb6..d300f1a 100644 --- a/testapi/tox.ini +++ b/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} |