Rev 4785: Fix fallback of NotApplicable to Skip. in http://bazaar.launchpad.net/~lifeless/bzr/subunit
Robert Collins
robertc at robertcollins.net
Sun Nov 1 05:52:29 GMT 2009
At http://bazaar.launchpad.net/~lifeless/bzr/subunit
------------------------------------------------------------
revno: 4785
revision-id: robertc at robertcollins.net-20091101055216-yfyue9tskyprkd0t
parent: robertc at robertcollins.net-20091101054157-1pddq7pqwsn5f7f0
committer: Robert Collins <robertc at robertcollins.net>
branch nick: subunit
timestamp: Sun 2009-11-01 16:52:16 +1100
message:
Fix fallback of NotApplicable to Skip.
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2009-11-01 05:41:57 +0000
+++ b/bzrlib/tests/__init__.py 2009-11-01 05:52:16 +0000
@@ -1579,12 +1579,12 @@
result.addSuccess(self)
def _do_not_applicable(self, result, e):
+ if not e.args:
+ reason = 'No reason given'
+ else:
+ reason = e.args[0]
addNotApplicable = getattr(result, 'addNotApplicable', None)
if addNotApplicable is not None:
- if not e.args:
- reason = 'No reason given'
- else:
- reason = e.args[0]
result.addNotApplicable(self, reason)
else:
self._do_skip(result, reason)
More information about the bazaar-commits
mailing list