api_test.py: when testing twistedhub, don't stop the hub since it's supported
This commit is contained in:
@@ -36,7 +36,8 @@ def check_hub():
|
|||||||
for nm in 'get_readers', 'get_writers', 'get_excs':
|
for nm in 'get_readers', 'get_writers', 'get_excs':
|
||||||
dct = getattr(hub, nm)()
|
dct = getattr(hub, nm)()
|
||||||
assert not dct, "hub.%s not empty: %s" % (nm, dct)
|
assert not dct, "hub.%s not empty: %s" % (nm, dct)
|
||||||
# Stop the runloop
|
# Stop the runloop (unless it's twistedhub which does not support that)
|
||||||
|
if not getattr(api.get_hub(), 'uses_twisted_reactor', None):
|
||||||
api.get_hub().abort()
|
api.get_hub().abort()
|
||||||
api.sleep(0)
|
api.sleep(0)
|
||||||
assert not api.get_hub().running
|
assert not api.get_hub().running
|
||||||
|
Reference in New Issue
Block a user