diff options
author | Jason Pellerin <jpellerin@gmail.com> | 2007-05-10 16:11:17 +0000 |
---|---|---|
committer | Jason Pellerin <jpellerin@gmail.com> | 2007-05-10 16:11:17 +0000 |
commit | c7f5c04c2f2d757e90301c8b76725ec5ee45bcd6 (patch) | |
tree | bb1ab7a361ad1c78a21f20375ce474eaeed57f58 /unit_tests/test_twisted.py | |
parent | f70ebb856aac38775fca4b4349afcb9872812cdb (diff) | |
download | nose-c7f5c04c2f2d757e90301c8b76725ec5ee45bcd6.tar.gz |
Added additional twisted integration tests. Fixed bug in twistedtools handling of reactors that caused twisted.trial tests run after twistedtools tests to hang or otherwise fail to report any outcome.
Diffstat (limited to 'unit_tests/test_twisted.py')
-rw-r--r-- | unit_tests/test_twisted.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/unit_tests/test_twisted.py b/unit_tests/test_twisted.py index 76b5718..e693374 100644 --- a/unit_tests/test_twisted.py +++ b/unit_tests/test_twisted.py @@ -1,22 +1,31 @@ +from nose.exc import SkipTest from nose.tools import * from nose.twistedtools import * from twisted.internet.defer import Deferred from twisted.internet.error import DNSLookupError + +def teardown(): + # print "stopping reactor" + stop_reactor() + class CustomError(Exception): pass -# Should succeed unless python-hosting is down +# FIXME move all dns-using tests to functional + +# Should succeed unless google is down #@deferred def test_resolve(): - return reactor.resolve("nose.python-hosting.com") + return reactor.resolve("www.google.com") test_resolve = deferred()(test_resolve) # Raises TypeError because the function does not return a Deferred #@raises(TypeError) #@deferred() def test_raises_bad_return(): + print reactor reactor.resolve("nose.python-hosting.com") test_raises_bad_return = raises(TypeError)(deferred()(test_raises_bad_return)) |