diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..3707a96 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,2 @@ +[run] +omit = gabbi/tests/* diff --git a/.gitignore b/.gitignore index df86a7e..66d1e52 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,9 @@ AUTHORS ChangeLog # Generated by testrepository .testrepository -.idea \ No newline at end of file +.idea +.cache/ +# coverage related +.coverage +cover/ +htmlcov/ diff --git a/test-requirements.txt b/test-requirements.txt index 3dd01e6..d852e69 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,6 @@ mock ; python_version < '3.3' testrepository coverage +pytest-cov hacking sphinx diff --git a/tox.ini b/tox.ini index 2fd9cae..f5ed4f2 100644 --- a/tox.ini +++ b/tox.ini @@ -44,6 +44,9 @@ commands = {toxinidir}/test-failskip.sh [testenv:cover] commands = python setup.py testr --coverage --testr-args="{posargs}" +[testenv:pytest-cov] +commands = py.test --cov=gabbi gabbi/tests --cov-config .coveragerc --cov-report html + [testenv:docs] commands = rm -rf doc/build