From 126e0e269a82775e91cffb71f979d8e72c15797b Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Mon, 21 Mar 2016 20:23:46 +0100 Subject: [PATCH] ADD coverage analysis * branch coverage * visualization with codecov.io * added codecov-badge to README --- .travis.yml | 4 ++-- README.rst | 4 ++++ tox.ini | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0da8c1d..22ca65d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ matrix: - python: 3.5 env: TOXENV=py35 before_install: - - pip install tox -# command to run tests + - pip install tox codecov script: - tox + - codecov diff --git a/README.rst b/README.rst index adae38d..fde5e4e 100644 --- a/README.rst +++ b/README.rst @@ -14,6 +14,10 @@ python-escpos - Python library to manipulate ESC/POS Printers :target: https://landscape.io/github/python-escpos/python-escpos/master :alt: Code Health +.. image:: https://codecov.io/github/python-escpos/python-escpos/coverage.svg?branch=master + :target: https://codecov.io/github/python-escpos/python-escpos?branch=master + :alt: Code Coverage + .. image:: https://readthedocs.org/projects/python-escpos/badge/?version=stable :target: http://python-escpos.readthedocs.org/en/latest/?badge=stable :alt: Documentation Status diff --git a/tox.ini b/tox.ini index c7460c5..0cee432 100644 --- a/tox.ini +++ b/tox.ini @@ -4,5 +4,4 @@ envlist = py27, py34, py35 [testenv] deps = nose coverage -commands = nosetests -# TODO: implement code coverage analysis (and of course tests at first) +commands = nosetests --with-coverage --cover-erase --cover-branches