diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2014-12-11 09:56:12 +1300 |
---|---|---|
committer | Robert Collins <robertc@robertcollins.net> | 2014-12-11 09:56:12 +1300 |
commit | acfc653d083d09772df32f67f90d7cc1603ed3fe (patch) | |
tree | 113c023cea272012f9fead5d6a6e29700369b449 | |
parent | 0bc24fac38207c81f9cfc4bafc2305b723701de9 (diff) | |
download | subunit-acfc653d083d09772df32f67f90d7cc1603ed3fe.tar.gz |
Remove support for SUBUNIT_FORMATTER, which has been broken for a long time.
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | python/subunit/__init__.py | 16 | ||||
-rwxr-xr-x | python/subunit/run.py | 4 |
3 files changed, 7 insertions, 19 deletions
@@ -5,6 +5,12 @@ subunit release notes NEXT (In development) --------------------- +BUGFIXES +~~~~~~~~ + +* SUBUNIT_FORMATTER which has not been honoured for years is now removed from + the codebase. (Jelmer Vernooij) + 1.0.0 ----- diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py index 7f0aa8c..bfa27a1 100644 --- a/python/subunit/__init__.py +++ b/python/subunit/__init__.py @@ -1250,22 +1250,6 @@ class TestResultStats(testresult.TestResult): return self.failed_tests == 0 -def get_default_formatter(): - """Obtain the default formatter to write to. - - :return: A file-like object. - """ - formatter = os.getenv("SUBUNIT_FORMATTER") - if formatter: - return os.popen(formatter, "w") - else: - stream = sys.stdout - if sys.version_info > (3, 0): - if safe_hasattr(stream, 'buffer'): - stream = stream.buffer - return stream - - def read_test_list(path): """Read a list of test ids from a file on disk. diff --git a/python/subunit/run.py b/python/subunit/run.py index e711dd6..8469ac9 100755 --- a/python/subunit/run.py +++ b/python/subunit/run.py @@ -26,7 +26,7 @@ import sys from testtools import ExtendedToStreamDecorator -from subunit import StreamResultToBytes, get_default_formatter +from subunit import StreamResultToBytes from subunit.test_results import AutoTimingTestResultDecorator from testtools.run import ( BUFFEROUTPUT, @@ -128,8 +128,6 @@ def main(argv=None, stdout=None): # stdout is None except in unit tests. if stdout is None: stdout = sys.stdout - # XXX: This is broken code- SUBUNIT_FORMATTER is not being honoured. - stream = get_default_formatter() # Disable the default buffering, for Python 2.x where pdb doesn't do it # on non-ttys. if hasattr(stdout, 'fileno'): |