From 7e91a215dd09cfdf21ac8566909c4fd7a468bb69 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 29 Jul 2010 12:18:28 -0700 Subject: [PATCH] Fixing ftplib test failures. --- tests/stdlib/all.py | 6 ++++-- tests/stdlib/test_ftplib.py | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/stdlib/all.py b/tests/stdlib/all.py index 9b47ee1..b2c2196 100644 --- a/tests/stdlib/all.py +++ b/tests/stdlib/all.py @@ -9,9 +9,11 @@ debug.hub_prevent_multiple_readers(False) def restart_hub(): from eventlet import hubs hub = hubs.get_hub() - hub.abort() hub_shortname = hub.__module__.split('.')[-1] - hubs.use_hub(hub_shortname) + # don't restart the pyevent hub; it's not necessary + if hub_shortname != 'pyevent': + hub.abort() + hubs.use_hub(hub_shortname) def assimilate_patched(name): try: diff --git a/tests/stdlib/test_ftplib.py b/tests/stdlib/test_ftplib.py index 3563738..8212ce3 100644 --- a/tests/stdlib/test_ftplib.py +++ b/tests/stdlib/test_ftplib.py @@ -4,8 +4,7 @@ from eventlet.green import ftplib from eventlet.green import threading from eventlet.green import socket -patcher.inject('test.test_ftplib', - globals()) +patcher.inject('test.test_ftplib', globals()) if __name__ == "__main__": test_main()