diff options
| author | Robert Collins <robertc@robertcollins.net> | 2013-06-17 07:25:50 +1200 |
|---|---|---|
| committer | Robert Collins <robertc@robertcollins.net> | 2013-06-17 07:25:50 +1200 |
| commit | e25b7a04a3bbd996fbd00418f1994645f62378bd (patch) | |
| tree | 4e72069119851d0ab2c01f4e604807ab7a8936eb /python | |
| parent | c2b9a4fa30d851b707b6a8bfc81874d6242364da (diff) | |
| download | subunit-e25b7a04a3bbd996fbd00418f1994645f62378bd.tar.gz | |
* The logic for `subunit.run` is now importable via python -
`subunit.run.main`. (Robert Collins, #606770)
Diffstat (limited to 'python')
| -rwxr-xr-x | python/subunit/run.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/subunit/run.py b/python/subunit/run.py index 2a3de42..b4ffdb3 100755 --- a/python/subunit/run.py +++ b/python/subunit/run.py @@ -105,7 +105,7 @@ class SubunitTestProgram(TestProgram): sys.exit(2) -if __name__ == '__main__': +def main(): # Disable the default buffering, for Python 2.x where pdb doesn't do it # on non-ttys. stream = get_default_formatter() @@ -118,3 +118,7 @@ if __name__ == '__main__': sys.stdout = binstdout SubunitTestProgram(module=None, argv=sys.argv, testRunner=runner, stdout=sys.stdout) + + +if __name__ == '__main__': + main() |
