api_test.py: don't include test_explicit in twistedhub tests, since it's not supported there

This commit is contained in:
Denis Bilenko
2009-06-15 13:12:40 +07:00
parent 28b23e51f1
commit e2e7d4b661

View File

@@ -162,13 +162,15 @@ class TestApi(tests.TestCase):
check_hub()
def test_explicit_hub(self):
api.use_hub(Foo)
assert isinstance(api.get_hub(), Foo), api.get_hub()
api.use_hub(api.get_default_hub())
check_hub()
if not getattr(api.get_hub(), 'uses_twisted_reactor', None):
def test_explicit_hub(self):
oldhub = api.get_hub()
try:
api.use_hub(Foo)
assert isinstance(api.get_hub(), Foo), api.get_hub()
finally:
api._threadlocal.hub = oldhub
check_hub()
def test_named(self):
named_foo = api.named('api_test.Foo')