Rev 4790: Show test ids not descriptions when reporting error/failures in tests. in http://bazaar.launchpad.net/~lifeless/bzr/test
Robert Collins
robertc at robertcollins.net
Sun Jan 17 06:29:44 GMT 2010
At http://bazaar.launchpad.net/~lifeless/bzr/test
------------------------------------------------------------
revno: 4790
revision-id: robertc at robertcollins.net-20100117062922-ctillqc0j71609s4
parent: pqm at pqm.ubuntu.com-20091106084512-t5ll6xywcd1bycfe
committer: Robert Collins <robertc at robertcollins.net>
branch nick: test
timestamp: Sun 2010-01-17 17:29:22 +1100
message:
Show test ids not descriptions when reporting error/failures in tests.
=== modified file 'NEWS'
--- a/NEWS 2009-11-05 20:08:36 +0000
+++ b/NEWS 2010-01-17 06:29:22 +0000
@@ -59,6 +59,9 @@
* KnownFailure is now signalled to ``ExtendedTestResult`` using the same
method that Python 2.7 uses - ``addExpectedFailure``. (Robert Collins)
+* Reporting of failures shows test ids not descriptions and thus shows
+ parameterised tests correctly. (Robert Collins)
+
* TestNotApplicable is now handled within the TestCase.run method rather
than being looked for within ``ExtendedTestResult.addError``. This
provides better handling with other ``TestResult`` objects, degrading to
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2009-11-01 05:52:16 +0000
+++ b/bzrlib/tests/__init__.py 2010-01-17 06:29:22 +0000
@@ -228,6 +228,9 @@
'%d non-main threads were left active in the end.\n'
% (TestCase._active_threads - 1))
+ def getDescription(self, test):
+ return test.id()
+
def _extractBenchmarkTime(self, testCase):
"""Add a benchmark time for the current test case."""
return getattr(testCase, "_benchtime", None)
More information about the bazaar-commits
mailing list