diff options
author | mike <michael.jmontcalm@gmail.com> | 2009-03-19 20:06:38 (GMT) |
---|---|---|
committer | mike <michael.jmontcalm@gmail.com> | 2009-03-19 20:06:38 (GMT) |
commit | e20cfb534e276fa7762980bbdd6d633a7ce99ccc (patch) | |
tree | 747a17e315aee9461ec81ab826b7de500b2d36d6 /src/sugar/tutorius/tests/run-tests.py | |
parent | ea24f196d662e0020a09b5e31c410adb1b7a7600 (diff) | |
parent | 2778a3bb56bb4509aef529eff0d52f02c554a96c (diff) |
Merge branch 'tutorial_toolkit' of ssh://mike@bobthebuilder.mine.nu:8080/home/git into tutorial_toolkit
Conflicts:
source/external/source/sugar-toolkit/src/sugar/tutorius/core.py
Diffstat (limited to 'src/sugar/tutorius/tests/run-tests.py')
-rwxr-xr-x | src/sugar/tutorius/tests/run-tests.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/sugar/tutorius/tests/run-tests.py b/src/sugar/tutorius/tests/run-tests.py new file mode 100755 index 0000000..db10c54 --- /dev/null +++ b/src/sugar/tutorius/tests/run-tests.py @@ -0,0 +1,44 @@ +#!/usr/bin/python +# 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_PATH) +) + +FULL_PATH = os.path.join(INSTALL_PATH,"sugar/tutorius") +GLOB_PATH = os.path.join(FULL_PATH,"*.py") +import unittest +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() |