1
from twisted.trial import unittest
2
from twisted.internet import defer
4
# Used in test_tests.TestUnhandledDeferred
6
class TestBleeding(unittest.TestCase):
7
"""This test creates an unhandled Deferred and leaves it in a cycle.
9
The Deferred is left in a cycle so that the garbage collector won't pick it
10
up immediately. We were having some problems where unhandled Deferreds in
11
one test were failing random other tests. (See #1507, #1213)
13
def test_unhandledDeferred(self):
16
except ZeroDivisionError:
18
# these two lines create the cycle. don't remove them