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 | 80e10ab3041518098f0d298fec214696f3d86fef (patch) | |
| tree | 4e72069119851d0ab2c01f4e604807ab7a8936eb /python/subunit | |
| parent | bf8e1ee6e053c12ebfbdebd48954af695948c492 (diff) | |
| download | subunit-git-80e10ab3041518098f0d298fec214696f3d86fef.tar.gz | |
* The logic for `subunit.run` is now importable via python -
`subunit.run.main`. (Robert Collins, #606770)
Diffstat (limited to 'python/subunit')
| -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() |
