← Back to team overview

testtools-dev team mailing list archive

Re: [Merge] lp:~jml/testtools/unexpected-success into lp:testtools

 

+            try:
+                test.fail("")
+            except test.failureException:
+                return self.addFailure(test, sys.exc_info())

Don't like that. If we're going to put a traceback in, I at least want one that goes through the right line of the test, like:

Traceback (most recent call last):
  File ".\bzrlib\tests\per_workingtree\test_smart_add.py", line 277, in test_accessible_explicit
    self.wt.smart_add, [u'a\u030a'])
  File "C:\Python24\Lib\site-packages\testtools\testcase.py", line 371, in expectFailure
    raise _UnexpectedSuccess(reason)
_UnexpectedSuccess: With WorkingTreeFormat2, smart_add requires normalized unicode filenames

Why not just pass on a details dict, and let addFailure convert that to a _StringException as needed?
-- 
https://code.launchpad.net/~jml/testtools/unexpected-success/+merge/39220
Your team testtools developers is requested to review the proposed merge of lp:~jml/testtools/unexpected-success into lp:testtools.



References