From 15af286c07c358c12676d07ce167aa210731d7c1 Mon Sep 17 00:00:00 2001 From: Jonathan Lange Date: Sun, 25 Mar 2012 15:58:44 +0100 Subject: [PATCH] Rename csv_result to CsvResult. --- filters/subunit2csv | 6 +++--- python/subunit/test_results.py | 6 +++--- python/subunit/tests/test_test_results.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/filters/subunit2csv b/filters/subunit2csv index da856b8..842884a 100755 --- a/filters/subunit2csv +++ b/filters/subunit2csv @@ -15,7 +15,7 @@ # # XXX: This is almost exactly the same as subunit2junitxml. The only -# difference is that we instantiate 'csv_result' rather than 'JUnitXmlResult'. +# difference is that we instantiate 'CsvResult' rather than 'JUnitXmlResult'. # Consider factoring this out into a common script helper. """Turn a subunit stream into a CSV""" @@ -24,7 +24,7 @@ from optparse import OptionParser import sys from subunit import DiscardStream, ProtocolTestCase -from subunit.test_results import csv_result +from subunit.test_results import CsvResult parser = OptionParser(description=__doc__) parser.add_option("--no-passthrough", action="store_true", @@ -41,7 +41,7 @@ else: output_to = file(options.output_to, 'wb') try: - result = csv_result(output_to) + result = CsvResult(output_to) if options.no_passthrough: passthrough_stream = DiscardStream() else: diff --git a/python/subunit/test_results.py b/python/subunit/test_results.py index 73adfab..fb7affd 100644 --- a/python/subunit/test_results.py +++ b/python/subunit/test_results.py @@ -579,15 +579,15 @@ class TestByTestResult(testtools.TestResult): self._details = details -class csv_result(TestByTestResult): +class CsvResult(TestByTestResult): def __init__(self, stream): - super(csv_result, self).__init__(self._on_test) + super(CsvResult, self).__init__(self._on_test) self._write_row = csv.writer(stream).writerow def _on_test(self, test, status, start_time, stop_time, tags, details): self._write_row([test.id(), status, start_time, stop_time]) def startTestRun(self): - super(csv_result, self).startTestRun() + super(CsvResult, self).startTestRun() self._write_row(['test', 'status', 'start_time', 'stop_time']) diff --git a/python/subunit/tests/test_test_results.py b/python/subunit/tests/test_test_results.py index 0e8d81e..6beb57a 100644 --- a/python/subunit/tests/test_test_results.py +++ b/python/subunit/tests/test_test_results.py @@ -464,7 +464,7 @@ class TestCsvResult(testtools.TestCase): def test_csv_output(self): stream = StringIO() - result = subunit.test_results.csv_result(stream) + result = subunit.test_results.CsvResult(stream) result._now = iter(range(5)).next result.startTestRun() result.startTest(self) @@ -479,7 +479,7 @@ class TestCsvResult(testtools.TestCase): def test_just_header_when_no_tests(self): stream = StringIO() - result = subunit.test_results.csv_result(stream) + result = subunit.test_results.CsvResult(stream) result.startTestRun() result.stopTestRun() self.assertEqual( @@ -488,7 +488,7 @@ class TestCsvResult(testtools.TestCase): def test_no_output_before_events(self): stream = StringIO() - subunit.test_results.csv_result(stream) + subunit.test_results.CsvResult(stream) self.assertEqual([], self.parse_stream(stream)) -- 2.34.1