diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-02-05 10:49:00 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-02-05 10:49:00 -0500 |
commit | 7f4fec38a943671e15275ac47b0ec398106159cf (patch) | |
tree | a9d6a79c2c0b9b56a9be8b758e36cd0a9b1ffdde | |
parent | 67d0d01a2bac0c3cf1b3ea6aead2f44451420d03 (diff) | |
download | cmd2-git-7f4fec38a943671e15275ac47b0ec398106159cf.tar.gz |
Added Coverage.py configuration file to exclude platform specific code from code coverage analysis.
The way our code is currently structured, it will exclude Windows and Mac code. So coverage report will only be accurate on Linux.
-rw-r--r-- | .coveragerc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..a10ebeae --- /dev/null +++ b/.coveragerc @@ -0,0 +1,22 @@ +# .coveragerc to control coverage.py +[run] +# (boolean, default False): whether to measure branch coverage in addition to statement coverage. +branch = False + + +[report] +# A list of regular expressions. Any line that matches one of these regexes is excluded from being reported as missing +exclude_lines = + # Have to re-enable the standard pragma + pragma: no cover + + # Don't complain if non-runnable code isn't run: + if __name__ == .__main__.: + + # Don't complain about OS-specific code for other OSes (excludes Windows and Mac, includes Linux) + if sys\.platform + + +[html] +# (string, default “htmlcov”): where to write the HTML report files. +directory = htmlcov |