Opened 9 years ago
Closed 9 years ago
#6377 enhancement closed fixed (fixed)
print traceback in successResultOf error reporting
Reported by: | Ying Li | Owned by: | Ying Li |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Keywords: | easy |
Cc: | Branch: |
branches/successResultOf-traceback-6377
branch-diff, diff-cov, branch-cov, buildbot |
|
Author: | cyli |
Description
It currently prints the repr
of the Failure
, it'd be nice to be able to find out where the Failure
occurred.
Also, would be nice to be able to pass optional errors to failureResultOf
to check which errors are supposed to have been raised similar to (like assertRaises
)
Change History (11)
comment:1 Changed 9 years ago by
Author: | → cyli |
---|---|
Branch: | → branches/successResultOf-traceback-6377 |
comment:2 Changed 9 years ago by
comment:3 Changed 9 years ago by
Forgot to include a refs tag in the commit message in the previous commit:
(In r37595) Include traceback in successResultOf error reporting
comment:5 Changed 9 years ago by
Owner: | Ying Li deleted |
---|
The failure thing might be out of scope and perhaps should be broken into a different ticket, but these are pretty tiny changes.
comment:6 Changed 9 years ago by
Keywords: | easy review added |
---|
comment:7 Changed 9 years ago by
Keywords: | review removed |
---|---|
Owner: | set to Ying Li |
successResultOf
andfailureResultOf
are supported on python 3, so additional behaviour for them should be tested, and tested succesfully.- I'd be inclined so say that
failureResultOf
should take a list of exception types, likeFailure.trap
,Failure.check
,TestCase.assertFailure
. (This would incidentally allow you to simply pass the list toFailure.check
, rather than 'if x and f.check(x):`. - The news item would read better as two seperate news items, which suggests that this should be two tickets.
comment:8 Changed 9 years ago by
comment:9 Changed 9 years ago by
Keywords: | review added |
---|---|
Owner: | Ying Li deleted |
Thanks for the quick review tom.prince!
- Hm... ok, I'm now testing to see if the traceback is in the str of the exception, since in Python 3 exceptions don't necessarily have a
.message
attribute anymore. - I've split the
failureResultOf
stuff into #6380. - Changed the newsfile to a
.misc
instead.
comment:10 Changed 9 years ago by
Keywords: | review removed |
---|---|
Owner: | set to Ying Li |
Looks good, please merge.
comment:11 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
(In [37591]) Branching to 'successResultOf-traceback-6377'