[Pkg-bitcoin-commits] [python-quamash] 216/269: Coverage Configuration Updates

Jonas Smedegaard dr at jones.dk
Fri Nov 24 11:26:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository python-quamash.

commit 9f09a49fe696682d26524a721361a70bfadad60f
Author: Mark Harviston <mark.harviston at gmail.com>
Date:   Sun Jan 18 15:34:20 2015 -0800

    Coverage Configuration Updates
    
    Some updates to code coverage configuration. This configuration is
    better, but still not very good.
---
 coveragerc => .coveragerc |  5 +++++
 README.rst                | 15 +++++++++++++--
 tox.ini                   |  2 +-
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/coveragerc b/.coveragerc
similarity index 81%
rename from coveragerc
rename to .coveragerc
index 767ee26..7469c66 100644
--- a/coveragerc
+++ b/.coveragerc
@@ -18,3 +18,8 @@ exclude_lines =
     # Don't complain if non-runnable code isn't run:
     if 0:
     if __name__ == .__main__.:
+
+[paths]
+source=
+	/quamash/  # change to linux source path
+	C:\quamash\ # change to windows source path
diff --git a/README.rst b/README.rst
index b394486..e2bbe54 100644
--- a/README.rst
+++ b/README.rst
@@ -131,8 +131,19 @@ For this reason it may be good to run tox tests while specificying which environ
 work well on Windows especially since PyQt5 and PyQt4 cannot coexist in the same python installation
 on Windows. Also the PyQt4 w/ Qt5 oddity appears to be mostly a windows only thing too.
 
-Style testing is also handled by tox. Run ``tox -e flake8``. Similarly run ``tox -e coverage`` to
-generate a coverage report.
+Style testing is also handled by tox. Run ``tox -e flake8``.
+
+Code Coverage
+-------------
+Getting a full coverage support is quite time consuming. In theory this could by done with `pytest-xdist`_,
+but I haven't had time to make that work. Install ``pytest-cov`` with ``pip install pytest-cov`` then
+run ``py.test --cov quamash`` then append a dot and an identifier the generated ``.coverage`` file. For example 
+``mv .coverage .coverage.nix.p33.pyside`` then repeat on all the platforms you want to run on. (at least linux
+and windows). Put all the ``.coverage.*`` files in one directory that also has quamash source code in it.
+``cd`` to that directory and run ``coverage combine`` finally run ``coverage html`` for html based reports
+or ``coverage report`` for a simple report. These last commands may fail with errors about not being able to
+find source code. Use the ``.coveragerc`` file to specify equivelant paths.  The default configuration has linux
+source code in ``/mnt/fuzzy/Development/quamash`` and windows source at ``C:\quamash``.
 
 Continuous Integration & Supported Platforms
 --------------------------------------------
diff --git a/tox.ini b/tox.ini
index 456ad6c..7e50084 100644
--- a/tox.ini
+++ b/tox.ini
@@ -42,7 +42,7 @@ basepython=python3.4
 deps=
 	pytest
 	pytest-cov
-commands=py.test --cov quamash --cov-config coveragerc
+commands=py.test --cov quamash
 
 [flake8]
 max-complexity=15

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/python-quamash.git



More information about the Pkg-bitcoin-commits mailing list