Opened 11 years ago
Last modified 8 years ago
#212 new defect
replace foolscap.test.common.ShouldFailMixin.shouldFail with twisted.trial.unittest.TestCase.failUnlessFailure ?
Reported by: | Zooko | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | eventually |
Component: | unknown | Version: | 0.6.4 |
Keywords: | Cc: |
Description (last modified by )
The foolscap shouldFail thing can require substrings, so maybe we need to use twisted.trial.unittest.TestCase.failUnlessSubstring
too.
Change History (3)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Milestone: | undecided → 0.6.5 |
comment:2 Changed 10 years ago by
Milestone: | 0.6.5 → eventually |
---|
I still think this is probably a good idea, but I'm no longer concerned about getting it into any particular release, including 0.6.5
comment:3 Changed 8 years ago by
At this point, it should be replaced with e = yield self.assertFailure(f, *exceptionTypes)
, followed by an extra self.assertIn(substr, str(e))
when needed
And ideally we should avoid waiting for Deferreds at all, and use f = self.failureResultOf(d)
which is synchronous.
Note: See
TracTickets for help on using
tickets.
I'm all for removing code, but we're currently compatible all the way back to Twisted-2.5.0, and I'd like to know what we're giving up to make a change like that.
In which version of Twisted did
failUnlessFailure
first appear?(also, I think we probably have multiple versions of shouldFail, so we can probably consolidate them at the same time).