diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-03-31 03:19:18 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-03-31 03:19:18 +0200 |
commit | a8ac7fda573a924debf165d39eff3c1837240d4f (patch) | |
tree | 6085df961a5fbcc57a240d7065d2fc4a258cf170 /lib/subunit/python/testtools/run.py | |
parent | e4af3afd7ae3e39218b42a42d39c2ec10be9a642 (diff) | |
download | samba-a8ac7fda573a924debf165d39eff3c1837240d4f.tar.gz samba-a8ac7fda573a924debf165d39eff3c1837240d4f.tar.xz samba-a8ac7fda573a924debf165d39eff3c1837240d4f.zip |
Put testtools directly under lib/ to make it easier to install from Samba 4.
Diffstat (limited to 'lib/subunit/python/testtools/run.py')
-rwxr-xr-x | lib/subunit/python/testtools/run.py | 39 |
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) |