summaryrefslogtreecommitdiffstats
path: root/lib/subunit/python/testtools/run.py
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-03-31 10:01:03 -0700
committerJeremy Allison <jra@samba.org>2010-03-31 10:01:03 -0700
commit2e839a636b2ea3f4d8dfcf5a8e99d9725787ba61 (patch)
tree42f219978f7d07d8fa196cb9ebd9db7be971450d /lib/subunit/python/testtools/run.py
parentf58d02dbeeeba037ee79fba93a707e959e90ffa3 (diff)
parent6f30b9a6ff57ca6112e6319c64c411d2bf09be79 (diff)
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'lib/subunit/python/testtools/run.py')
-rwxr-xr-xlib/subunit/python/testtools/run.py39
1 files changed, 0 insertions, 39 deletions
diff --git a/lib/subunit/python/testtools/run.py b/lib/subunit/python/testtools/run.py
deleted file mode 100755
index c4f461ecfb..0000000000
--- a/lib/subunit/python/testtools/run.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (c) 2009 Jonathan M. Lange. See LICENSE for details.
-
-"""python -m testtools.run testspec [testspec...]
-
-Run some tests with the testtools extended API.
-
-For instance, to run the testtools test suite.
- $ python -m testtools.run testtools.tests.test_suite
-"""
-
-import sys
-
-from testtools.tests import test_suite
-from testtools import TextTestResult
-
-
-class TestToolsTestRunner(object):
- """ A thunk object to support unittest.TestProgram."""
-
- def run(self, test):
- "Run the given test case or test suite."
- result = TextTestResult(sys.stdout)
- result.startTestRun()
- try:
- return test.run(result)
- finally:
- result.stopTestRun()
-
-
-if __name__ == '__main__':
- import optparse
- from unittest import TestProgram
- parser = optparse.OptionParser(__doc__)
- args = parser.parse_args()[1]
- if not args:
- parser.error("No testspecs given.")
- runner = TestToolsTestRunner()
- program = TestProgram(module=None, argv=[sys.argv[0]] + args,
- testRunner=runner)