From 974f135e63dd54552647ad9f331183753202a192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 25 Apr 2016 16:43:09 +0200 Subject: [PATCH] Measure unit test coverage. Coverage is reported with py.test, and also "Run unit tests in ... with coverage" is now supported in PyCharm. --- .gitignore | 1 + requirements.txt | 2 ++ setup.cfg | 5 +++++ 3 files changed, 8 insertions(+) create mode 100644 setup.cfg diff --git a/.gitignore b/.gitignore index 5404cbac..c3666ae6 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ /pillar/application/static/storage/ /build /.cache +/.coverage /pillar/pillar.egg-info/ diff --git a/requirements.txt b/requirements.txt index 97dbff39..959fa863 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,6 +27,7 @@ zencoder==0.6.5 # Development requirements pytest==2.9.1 responses==0.5.1 +pytest-cov==2.2.1 # Secondary requirements Flask==0.10.1 @@ -53,3 +54,4 @@ pyasn1-modules==0.0.8 pymongo==3.2.2 six==1.10.0 wsgiref==0.1.2 +coverage==4.0.3 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..0ea2f23c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,5 @@ +[pytest] +addopts = -v --cov pillar --cov-report term-missing + +[pep8] +max-line-length = 100