From e881f76a91df0b8124c4fda5ee31cd03f3318e44 Mon Sep 17 00:00:00 2001 From: Jonathan Lange Date: Tue, 6 May 2008 00:16:42 +1200 Subject: Use the test ID, not the test description. --- python/subunit/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'python/subunit/__init__.py') diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py index f0b0987..5ee25d1 100644 --- a/python/subunit/__init__.py +++ b/python/subunit/__init__.py @@ -214,25 +214,25 @@ class TestProtocolClient(unittest.TestResult): def addError(self, test, error): """Report an error in test test.""" - self._stream.write("error: %s [\n" % test.shortDescription()) + self._stream.write("error: %s [\n" % test.id()) for line in self._exc_info_to_string(error, test).split(): self._stream.write("%s\n" % line) self._stream.write("]\n") def addFailure(self, test, error): """Report a failure in test test.""" - self._stream.write("failure: %s [\n" % test.shortDescription()) + self._stream.write("failure: %s [\n" % test.id()) for line in self._exc_info_to_string(error, test).split(): self._stream.write("%s\n" % line) self._stream.write("]\n") def addSuccess(self, test): """Report a success in a test.""" - self._stream.write("successful: %s\n" % test.shortDescription()) + self._stream.write("successful: %s\n" % test.id()) def startTest(self, test): """Mark a test as starting its test run.""" - self._stream.write("test: %s\n" % test.shortDescription()) + self._stream.write("test: %s\n" % test.id()) def RemoteError(description=""): -- cgit v1.2.1 From 150a47e415a72cf43b06b024faf8ea7aee0ab281 Mon Sep 17 00:00:00 2001 From: Jonathan Lange Date: Thu, 19 Jun 2008 10:55:24 +1000 Subject: Split tracebacks by *line* rather than by any whitespace. --- python/subunit/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/subunit/__init__.py') diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py index 5ee25d1..f52dbaa 100644 --- a/python/subunit/__init__.py +++ b/python/subunit/__init__.py @@ -215,14 +215,14 @@ class TestProtocolClient(unittest.TestResult): def addError(self, test, error): """Report an error in test test.""" self._stream.write("error: %s [\n" % test.id()) - for line in self._exc_info_to_string(error, test).split(): + for line in self._exc_info_to_string(error, test).splitlines(): self._stream.write("%s\n" % line) self._stream.write("]\n") def addFailure(self, test, error): """Report a failure in test test.""" self._stream.write("failure: %s [\n" % test.id()) - for line in self._exc_info_to_string(error, test).split(): + for line in self._exc_info_to_string(error, test).splitlines(): self._stream.write("%s\n" % line) self._stream.write("]\n") -- cgit v1.2.1 From 0c09f4a34ac3d4f75292306839709bc18762f8ac Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Sat, 13 Dec 2008 15:29:46 +1100 Subject: Review feedback from jml. --- python/subunit/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/subunit/__init__.py') diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py index bf1e0cc..b2b5129 100644 --- a/python/subunit/__init__.py +++ b/python/subunit/__init__.py @@ -1,5 +1,5 @@ # -# subunit: extensions to python unittest to get test results from subprocesses. +# subunit: extensions to Python unittest to get test results from subprocesses. # Copyright (C) 2005 Robert Collins # # This program is free software; you can redistribute it and/or modify @@ -220,7 +220,7 @@ class TestProtocolServer(object): class RemoteException(Exception): - """An exception that occured remotely to python.""" + """An exception that occured remotely to Python.""" def __eq__(self, other): try: @@ -268,7 +268,7 @@ def RemoteError(description=""): class RemotedTestCase(unittest.TestCase): """A class to represent test cases run in child processes. - Instances of this class are used to provide the python test API a TestCase + Instances of this class are used to provide the Python test API a TestCase that can be printed to the screen, introspected for metadata and so on. However, as they are a simply a memoisation of a test that was actually run in the past by a separate process, they cannot perform any interactive -- cgit v1.2.1