Asynchronously supercalling setUp or tearDown fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
testtools |
New
|
Undecided
|
Unassigned |
Bug Description
I expected this would be a valid test case:
```
from testtools import TestCase
from testtools.
from twisted.
class X(TestCase):
run_tests_with = AsynchronousDef
def setUp(self):
d = Deferred()
return d
def test_foo(self):
pass
```
However, it fails:
```
=======
[ERROR]
Traceback (most recent call last):
Failure: testtools.
twisted-log
traceback-1: {{{
Traceback (most recent call last):
File "/home/
raise e
testtools.
ired or been cancelled:
<DelayedCall 0x7fc94d489ab8 [-0.00155591964
}}}
Traceback (most recent call last):
File "/home/
result = f(*args, **kw)
File "/home/
self.
ValueError: In File: /tmp/asyncfixtu
TestCase.setUp was not called. Have you upcalled all the way up the hierarchy from your setUp? e.g. Call super(X, self).setUp() from your setUp().
asyncfixture.
-------
```
The check for upcalling happens synchronously and independent of the Twisted support being applied.