Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / lib / python2.7 / dist-packages / twisted / trial / test / | server ip : 172.67.156.115 your ip : 108.162.241.221 H O M E |
Filename | /usr/lib/python2.7/dist-packages/twisted/trial/test/weird.py |
Size | 720 |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 09:56 |
Last modified | 23-Aug-2012 21:47 |
Last accessed | 27-Apr-2025 09:57 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
from __future__ import division, absolute_import
import unittest
from twisted.internet import defer
# Used in test_tests.TestUnhandledDeferred
class TestBleeding(unittest.TestCase):
"""This test creates an unhandled Deferred and leaves it in a cycle.
The Deferred is left in a cycle so that the garbage collector won't pick it
up immediately. We were having some problems where unhandled Deferreds in
one test were failing random other tests. (See #1507, #1213)
"""
def test_unhandledDeferred(self):
try:
1/0
except ZeroDivisionError:
f = defer.fail()
# these two lines create the cycle. don't remove them
l = [f]
l.append(l)
import unittest
from twisted.internet import defer
# Used in test_tests.TestUnhandledDeferred
class TestBleeding(unittest.TestCase):
"""This test creates an unhandled Deferred and leaves it in a cycle.
The Deferred is left in a cycle so that the garbage collector won't pick it
up immediately. We were having some problems where unhandled Deferreds in
one test were failing random other tests. (See #1507, #1213)
"""
def test_unhandledDeferred(self):
try:
1/0
except ZeroDivisionError:
f = defer.fail()
# these two lines create the cycle. don't remove them
l = [f]
l.append(l)