From 402404efa2712b74faebbf2e694ee14d3f0df963 Mon Sep 17 00:00:00 2001 From: freewind Date: Mon, 26 Mar 2018 18:27:41 +0800 Subject: [PATCH] improve coverage config --- .coveragerc | 13 +++++++++++++ .gitignore | 2 +- coverage_report.sh | 5 +++-- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..20e1caf4 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,13 @@ +[run] +source = + . + +[report] +omit = + *__init__.py + /usr/* + *_test.py + setup.py + +[html] +directory = coverage_html_report diff --git a/.gitignore b/.gitignore index 5b750542..486996cc 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,5 @@ dist laser* lol* .idea* -htmlcov/ +coverage_html_report/ .coverage diff --git a/coverage_report.sh b/coverage_report.sh index fc10bd70..67c142b9 100755 --- a/coverage_report.sh +++ b/coverage_report.sh @@ -1,5 +1,6 @@ #!/bin/sh -coverage run --source=mythril -m unittest discover -p "*_test.py" +rm -rf htmlcov +coverage run -m unittest discover -p "*_test.py" coverage html -open htmlcov/index.html +open coverage_html_report/index.html