summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-08 18:20:05 +0900
committerkali <kali@leap.se>2012-08-08 18:20:05 +0900
commitbe1defea901e51c386beb056a649ff29925e6bb3 (patch)
tree2a19499bfd104fd66766fa77029abc2352c9939a
parent81e0e2bc82757425bebfb659e6c2cb873bc88ec9 (diff)
minimal coverage config
still needing some love for the --include part in the html report.
-rw-r--r--.gitignore1
-rwxr-xr-xrun_tests.sh16
-rw-r--r--src/leap/__init__.py5
3 files changed, 16 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 26e88b6c..26838e5c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@ core
debian/python-leap-client/
dist/
docs/_build
+docs/covhtml
include/
lib/
local/
diff --git a/run_tests.sh b/run_tests.sh
index ca4faa14..9a28d2f0 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -121,17 +121,21 @@ fi
run_tests
-# NOTE(sirp): we only want to run pep8 when we're running the full-test suite,
-# not when we're running tests individually. To handle this, we need to
-# distinguish between options (noseopts), which begin with a '-', and
-# arguments (noseargs).
if [ -z "$noseargs" ]; then
if [ $no_pep8 -eq 0 ]; then
run_pep8
fi
fi
+function run_coverage {
+ # XXX not working? getting 3rd party modules
+ coverage_opts="--include `pwd`/src/leap/*,`pwd`/src/leap/eip/*"
+ ${wrapper} coverage html -d docs/covhtml -i $coverage_opts
+ echo "now point your browser at docs/covhtml/index.html"
+}
+
if [ $coverage -eq 1 ]; then
- echo "Generating coverage report in covhtml/"
- ${wrapper} coverage html -d covhtml -i
+ echo "Generating coverage report in docs/covhtml/"
+ run_coverage
+ exit
fi
diff --git a/src/leap/__init__.py b/src/leap/__init__.py
index e69de29b..a7ae10e3 100644
--- a/src/leap/__init__.py
+++ b/src/leap/__init__.py
@@ -0,0 +1,5 @@
+from leap import eip
+from leap import baseapp
+from leap import util
+
+__all__ = [eip, baseapp, util]