summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2014-12-02 23:48:46 +0000
committerRobert Collins <robertc@robertcollins.net>2014-12-11 09:56:12 +1300
commita0f4925f4cb3afe8aab53993d521141606ae3ef8 (patch)
tree113c023cea272012f9fead5d6a6e29700369b449 /python
parenta7ea9e11a2e6626f1e5726a5e2a5ad514e86921e (diff)
downloadsubunit-git-a0f4925f4cb3afe8aab53993d521141606ae3ef8.tar.gz
Remove support for SUBUNIT_FORMATTER, which has been broken for a long time.
Diffstat (limited to 'python')
-rw-r--r--python/subunit/__init__.py16
-rwxr-xr-xpython/subunit/run.py4
2 files changed, 1 insertions, 19 deletions
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'):