diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2009-06-04 01:44:58 +0200 |
|---|---|---|
| committer | Jelmer Vernooij <jelmer@samba.org> | 2009-06-04 01:44:58 +0200 |
| commit | d14cda0c7c872b20e435b3ed563b4b1215330390 (patch) | |
| tree | df1b53c63d7ef40da439d89f751922529aff7583 /python/subunit | |
| parent | 36a8fff948b6775ef1c6fc40edb68dcd89b0ed4e (diff) | |
| download | subunit-git-d14cda0c7c872b20e435b3ed563b4b1215330390.tar.gz | |
Add trivial command-line test runner.
Diffstat (limited to 'python/subunit')
| -rw-r--r-- | python/subunit/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py index 7d800a8..23f3f07 100644 --- a/python/subunit/__init__.py +++ b/python/subunit/__init__.py @@ -774,3 +774,14 @@ class TestResultFilter(unittest.TestResult): return id[len("subunit.RemotedTestCase."):] return id + +class SubunitTestRunner(object): + def __init__(self, stream=sys.stdout): + self.stream = stream + + def run(self, test): + "Run the given test case or test suite." + result = TestProtocolClient(self.stream) + test(result) + return result + |
