diff options
author | shangxdy <shang.xiaodong@zte.com.cn> | 2017-09-28 13:52:20 +0800 |
---|---|---|
committer | shangxdy <shang.xiaodong@zte.com.cn> | 2017-09-28 13:52:20 +0800 |
commit | 9156f6afb5832175762ea2ab8d21e54520665868 (patch) | |
tree | 1a641bed2f5103ad85bb68cffd4d68182f45188b | |
parent | 51a4cb9a4026037147da64b2353ec44002c7a7a7 (diff) |
Add coverage test item
Currently there is no coverage report, so it's necessary to add covrage
test for parser.
JIRA: PARSER-159
Change-Id: I7688b2c7e3adc8d0009e5edf33be41c7c75a5d87
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | tosca2heat/heat-translator/.gitignore | 3 | ||||
-rw-r--r-- | tosca2heat/heat-translator/tox.ini | 7 | ||||
-rw-r--r-- | tosca2heat/tosca-parser/.gitignore | 3 | ||||
-rw-r--r-- | tosca2heat/tosca-parser/tox.ini | 7 |
5 files changed, 15 insertions, 6 deletions
@@ -28,6 +28,7 @@ var/ *.egg-info/ .installed.cfg *.egg +cover # PyInstaller # Usually these files are written by a python script from a template diff --git a/tosca2heat/heat-translator/.gitignore b/tosca2heat/heat-translator/.gitignore index 7dfa8ae..05b67b1 100644 --- a/tosca2heat/heat-translator/.gitignore +++ b/tosca2heat/heat-translator/.gitignore @@ -17,6 +17,7 @@ develop-eggs .installed.cfg lib lib64 +cover # Installer logs pip-log.txt @@ -50,4 +51,4 @@ ChangeLog *~ .*.swp .idea -*.iml
\ No newline at end of file +*.iml diff --git a/tosca2heat/heat-translator/tox.ini b/tosca2heat/heat-translator/tox.ini index 6ba58c3..447eb6e 100644 --- a/tosca2heat/heat-translator/tox.ini +++ b/tosca2heat/heat-translator/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 1.6 -envlist = py27,pep8 +envlist = pep8,py27,cover skipsdist = True [testenv] @@ -19,7 +19,10 @@ commands = flake8 commands = {posargs} [testenv:cover] -commands = python setup.py testr --coverage --coverage-package-name=translator --testr-args='{posargs}' +commands = + coverage erase + python setup.py test --coverage --coverage-package-name=translator --testr-args='{posargs}' + coverage report [testenv:docs] commands = python setup.py build_sphinx diff --git a/tosca2heat/tosca-parser/.gitignore b/tosca2heat/tosca-parser/.gitignore index c172104..2fe4959 100644 --- a/tosca2heat/tosca-parser/.gitignore +++ b/tosca2heat/tosca-parser/.gitignore @@ -17,6 +17,7 @@ develop-eggs .installed.cfg lib lib64 +cover # Installer logs pip-log.txt @@ -53,4 +54,4 @@ ChangeLog *.iml # OSX -.DS_Store
\ No newline at end of file +.DS_Store diff --git a/tosca2heat/tosca-parser/tox.ini b/tosca2heat/tosca-parser/tox.ini index 3603a18..1e27f3f 100644 --- a/tosca2heat/tosca-parser/tox.ini +++ b/tosca2heat/tosca-parser/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 2.0 -envlist = py27,pep8 +envlist = pep8,py27,cover skipsdist = True [testenv] @@ -19,7 +19,10 @@ commands = flake8 commands = {posargs} [testenv:cover] -commands = python setup.py testr --coverage --coverage-package-name=toscaparser --testr-args='{posargs}' +commands = + coverage erase + python setup.py test --coverage --coverage-package-name=toscaparser --testr-args='{posargs}' + coverage report [testenv:docs] commands = python setup.py build_sphinx |