Opened 16 years ago

Closed 16 years ago

#1869 enhancement closed fixed (fixed)

twisted.trial.unittest.TestCase.failUnlessFailure should provide more information

Reported by: Jean-Paul Calderone Owned by:
Priority: highest Milestone:
Component: trial Keywords:
Cc: Branch:


Currently if the assertion fails, very little information is available to the developer about why it failed. The type of exception which was raised is shown, but no traceback or even string version of the exception is shown. This makes it hard to figure out why the assertion failed.

Change History (6)

comment:1 Changed 16 years ago by Jonathan Lange

Priority: normalhigh

comment:2 Changed 16 years ago by Jonathan Lange

Keywords: review added
Owner: changed from Jonathan Lange to Jean-Paul Calderone
Priority: highhighest

Ready for review in source:branches/failure-info-1869

comment:3 Changed 16 years ago by Jean-Paul Calderone

Status: newassigned

comment:4 Changed 16 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: changed from Jean-Paul Calderone to Jonathan Lange
Status: assignednew

failUnlessFailure docstring is a mess. Can you fix the pre-existing punctuation and spelling errors (as long as you are reformatting it anyway)?

Otherwise very nice branch.

comment:5 Changed 16 years ago by Jonathan Lange

Resolution: fixed
Status: newclosed

(In [17509]) Provide stack trace information when assertFailure fails.

  • Author: jml
  • Reviewer: exarkun
  • Fixes #1869

assertFailure (aka failUnlessFailure) used to only report the class of the unexpected exception. Now it also reports the brief stacktrace and message from that exception.

comment:6 Changed 11 years ago by <automation>

Owner: Jonathan Lange deleted
Note: See TracTickets for help on using tickets.