Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/tutorius/tests/run-tests.py
diff options
context:
space:
mode:
authormike <michael.jmontcalm@gmail.com>2009-03-19 20:20:40 (GMT)
committer mike <michael.jmontcalm@gmail.com>2009-03-19 20:20:40 (GMT)
commitde3cb8c0c9ab1bb2215338e1757bb231331e1c6c (patch)
tree98d99a66d829e5b94ba7392ee813e13b4e605ca9 /src/sugar/tutorius/tests/run-tests.py
parent3d41146af5f136d156b5a1f0c65c553612fbd4b2 (diff)
parente20cfb534e276fa7762980bbdd6d633a7ce99ccc (diff)
Merge branch 'tutorial_toolkit' into mike
Conflicts: source/activities/Writus.activity/TAbiWordActivity.py source/external/source/sugar-toolkit/src/sugar/graphics/window.py source/external/source/sugar-toolkit/src/sugar/tutorius/Makefile.am source/external/source/sugar-toolkit/src/sugar/tutorius/actions.py source/external/source/sugar-toolkit/src/sugar/tutorius/overlayer.py source/external/source/sugar-toolkit/src/sugar/tutorius/services.py source/external/source/sugar-toolkit/src/sugar/tutorius/tests/coretests.py source/external/source/sugar-toolkit/src/sugar/tutorius/tests/run-tests.py
Diffstat (limited to 'src/sugar/tutorius/tests/run-tests.py')
-rwxr-xr-xsrc/sugar/tutorius/tests/run-tests.py38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/sugar/tutorius/tests/run-tests.py b/src/sugar/tutorius/tests/run-tests.py
index 74efd64..db10c54 100755
--- a/src/sugar/tutorius/tests/run-tests.py
+++ b/src/sugar/tutorius/tests/run-tests.py
@@ -2,11 +2,43 @@
# This is a dumb script to run tests on the sugar-jhbuild installed files
# The path added is the default path for the jhbuild build
+INSTALL_PATH="../../../../../../install/lib/python2.5/site-packages/"
+
import os, sys
sys.path.insert(0,
- os.path.abspath("../../../../../../install/lib/python2.5/site-packages/")
+ os.path.abspath(INSTALL_PATH)
)
+
+FULL_PATH = os.path.join(INSTALL_PATH,"sugar/tutorius")
+GLOB_PATH = os.path.join(FULL_PATH,"*.py")
import unittest
-from coretests import *
+from glob import glob
+
+import sys
+if __name__=='__main__':
+ if "--coverage" in sys.argv:
+ sys.argv=[arg for arg in sys.argv if arg != "--coverage"]
+ import coverage
+ coverage.erase()
+ #coverage.exclude('raise NotImplementedError')
+ coverage.start()
+
+ import coretests
+ import servicestests
+
+
+ suite = unittest.TestSuite()
+ suite.addTests(unittest.findTestCases(coretests))
+ suite.addTests(unittest.findTestCases(servicestests))
+
+ runner = unittest.TextTestRunner()
+ runner.run(suite)
+
+ coverage.stop()
+ coverage.report(glob(GLOB_PATH))
+ coverage.erase()
+ else:
+ from coretests import *
+ from servicestests import *
-unittest.main()
+ unittest.main()