From 5ef59e3f54ccde1011e7a1c3a061a43fb3a3fcc5 Mon Sep 17 00:00:00 2001 From: Victor Yap Date: Fri, 27 Oct 2017 11:38:16 +0000 Subject: [PATCH] Add coverage, coveralls tooling --- .travis.yml | 6 ++++-- Makefile | 1 - requirements_dev.txt | 2 ++ tox.ini | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1f65b98..789b24b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ deploy: secure: YtT0HXAfjYB6thf4RqHbu4CdQzn2VtL3lrjauwoULbB5IST8ch5Lf303yBSo5KnE8EkDGKrPJ1kztA64XusaTqLUQBIttEeuW2tpRAbYs1l6Ct4ZxugW8oE7lNsQRWA+F2f9IXjLS0Cc8T03uV274ygPRU7mJDLfs2jK2BSVi3JkyPXkdTsyQgXgBgLdnvJWK+QfZTS2xJLCMn5UPdZet3nSVBPoM1bVkvDWLqrNAqPy/ZmP5AU6JfjxiaFdOMViCF38nhpLi4kcugn4swKnyJtyFBhyDBFejZW8V0EY5+nJT9CgSqBxSRLF5kw7yddbG4WiL7km0b8SNfqQ55aKOMr/jNDIPn9fCX2+BCYW1JFSzsby5bB+JgI72GiD7xxaQYSSdaHCPGu0JWceZDLXEt0En45MtfE/46GAZpE+frUVOSIZRc4jllHuN3tE9M41xbCKs2GjQ3yyyJo4ky0sxoeJ50zegzOM7HgnEy7j0nl0gzOcZ46ZyjOVfZ/zcW+zVOBp9Y7tgeuDp1eWH90SSbl6SkbRW13vr/wfO4GD0XaxwcGvUkVfwvPy4up6kxB6I1OOzOb3T03JmLegUi6+/LH5UyKwHb4MauerSNa2I2dN6WCfi1cvmGp+SMO4wRSy/r9fRwBdpiExmq0UOE+DsCMx4bXhwqaqWoxAurAe2Cc= provider: pypi user: vicyap -install: pip install -U tox-travis flake8 +install: pip install -U tox-travis flake8 pytest coverage coveralls language: python python: - 3.6 @@ -17,5 +17,7 @@ python: - 3.4 - 2.7 script: - - tox - make lint + - tox + - make coverage + - coveralls diff --git a/Makefile b/Makefile index 503a429..cb2f580 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,6 @@ coverage: ## check code coverage quickly with the default Python coverage run --source python_hologram_api -m pytest coverage report -m coverage html - $(BROWSER) htmlcov/index.html docs: ## generate Sphinx HTML documentation, including API docs rm -f docs/python_hologram_api.rst diff --git a/requirements_dev.txt b/requirements_dev.txt index 53c7c0f..69ce7e3 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -7,3 +7,5 @@ tox==2.3.1 coverage==4.1 Sphinx==1.4.8 PyYAML==3.11 +pytest==2.9.2 +pytest-runner==2.11.1 diff --git a/tox.ini b/tox.ini index 34e9a4c..fe1c091 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ deps = -r{toxinidir}/requirements_dev.txt commands = pip install -U pip - python -m unittest discover -v + py.test ; If you want to make tox run the tests with the same versions, create a