addUnexpectedSuccess and addExpectedFailure error out when used with trial
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Twisted |
Unknown
|
Unknown
|
|||
testtools |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
You can't reliably use testtools TestCases with trial, because Trial's reporter is incompatible with modern `addUnexpectedS
Trial's `IReporter` interface has the following:
```
def addUnexpectedSu
def addExpectedFail
```
Where `todo` is a `Todo` object, and there are notes saying that it should just be a string.
testtools's result interface has:
```
def addUnexpectedSu
def addExpectedFail
```
(edited for notation compatibility)
And when testtools wraps other results with ExtendedToOrigi
```
# unexpected success
def addUnexpectedSu
def addUnexpectedSu
def addFailure(test, err)
# expected failure
def addExpectedFail
def addExpectedFail
def addSuccess(test):
```
This is a plain messy compatibility issue. While it's not strictly a bug in testtools, testtools might well be the most effective place to fix it. There's precedent, in that we already have backwards compatibility code for legacy TestResults.
Fixed in Twisted