Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
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))