Skip to content

Instantly share code, notes, and snippets.

@slacy
Created October 9, 2012 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slacy/3861282 to your computer and use it in GitHub Desktop.
Save slacy/3861282 to your computer and use it in GitHub Desktop.
Rudimentary Twisted Trial Unit test that hangs
from twisted.trial import unittest
from twisted.internet.defer import Deferred
class TestRudimentary(unittest.TestCase):
# This test case succeeds, but hangs at the end of the invocation when running through nosetests.
# How can this be fixed?
def test_rudimentary(self):
def done(_ignored):
print "DONE"
defer = Deferred()
defer.addCallback(done)
return defer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment