Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorVincent Vinet <vince.vinet@gmail.com>2009-12-06 19:43:16 (GMT)
committer Vincent Vinet <vince.vinet@gmail.com>2009-12-06 20:41:39 (GMT)
commit2bda2c8c50797a6214126edc5afdc3fc5d8e9969 (patch)
tree4697873cfa4de532ee691a17a29e781fe5c5782d /setup.py
parentfb422aef7ee6832c85c8fa8a703e491838e74d62 (diff)
improve coverage report and cleanup old stuff
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 49bae4c..fb500c1 100755
--- a/setup.py
+++ b/setup.py
@@ -6,6 +6,14 @@ import os, sys
import glob
from unittest import TestLoader, TextTestRunner, TestSuite
+COVERAGE_IGNORE=[
+ "tutorius/apilib",
+ "tutorius/viewer.py",
+ "tutorius/creator.py",
+ "tutorius/overlayer.py",
+ "tutorius/addons",
+]
+
class TestCommand(Command):
user_options = [('coverage',
None,
@@ -69,13 +77,21 @@ class TestCommand(Command):
if self.coverage:
coverage.stop()
sources = []
- os.path.walk(os.path.join(prefix,'sugar','tutorius'),
+ #To reduce report format, change to the tutorius dir before reporting
+ curdir = os.getcwd()
+ os.chdir(os.path.join(prefix, 'sugar'))
+ os.path.walk('tutorius',
self._listsources,
sources)
coverage.report(sources)
+ os.chdir(curdir)
coverage.erase()
def _listsources(self, arg, dirname, fnames):
+ for name in list(fnames):
+ if os.path.join(dirname, name) in COVERAGE_IGNORE:
+ fnames.remove(name)
+
fnames = filter(lambda x:x.endswith('.py'), fnames)
for name in fnames:
arg.append(pjoin(dirname, name))