K2LL33D SHELL

 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 : 104.21.89.46

your ip : 172.70.179.177

H O M E


Filename/usr/lib/python2.7/dist-packages/twisted/trial/test/weird.py
Size720
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 09:56
Last modified23-Aug-2012 21:47
Last accessed07-Jul-2025 10:04
Actionsedit | rename | delete | download (gzip)
Viewtext | 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)