diff options
| author | Ryan Williams <rdw@lindenlab.com> | 2010-02-09 08:17:46 -0800 |
|---|---|---|
| committer | Ryan Williams <rdw@lindenlab.com> | 2010-02-09 08:17:46 -0800 |
| commit | e1ee3cefbc7c1b7d2bc194374a27051fb64f6f98 (patch) | |
| tree | 23bf119d4fc7ac06778b798d204a83a87aa3c1ed /tests/stdlib/all.py | |
| parent | 30c7f0f677389a1dfae3d87e7e8e8b704817a022 (diff) | |
| download | eventlet-e1ee3cefbc7c1b7d2bc194374a27051fb64f6f98.tar.gz | |
Added monkeypatch stdlib tests, which test how well monkeypatching works. Unsurprisingly, some tweakage was also needed.
Diffstat (limited to 'tests/stdlib/all.py')
| -rw-r--r-- | tests/stdlib/all.py | 47 |
1 files changed, 5 insertions, 42 deletions
diff --git a/tests/stdlib/all.py b/tests/stdlib/all.py index 33b7d8f..5236e7c 100644 --- a/tests/stdlib/all.py +++ b/tests/stdlib/all.py @@ -4,7 +4,7 @@ Many of these tests make connections to external servers, and all.py tries to sk """ -def import_main(name): +def assimilate_patched(name): try: modobj = __import__(name, globals(), locals(), ['test_main']) except ImportError: @@ -18,44 +18,7 @@ def import_main(name): except AttributeError: print "No test_main for %s, assuming it tests on import" % name - -# quick and dirty way of testing whether we can access -# remote hosts; any tests that try internet connections -# will fail if we cannot -import socket -s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -try: - s.settimeout(0.5) - s.connect(('eventlet.net', 80)) - s.close() - have_network_access = True -except socket.error, e: - print "Skipping network tests" - have_network_access = False - -import_main('test_select') -import_main('test_SimpleHTTPServer') -import_main('test_asynchat') -import_main('test_asyncore') -import_main('test_ftplib') -import_main('test_httplib') -if have_network_access: - import_main('test_httpservers') -import_main('test_os') -import_main('test_queue') -if have_network_access: - import_main('test_socket') -import_main('test_socket_ssl') -#import_main('test_socketserver') -#import_main('test_subprocess') -if have_network_access: - import_main('test_ssl') -import_main('test_thread') -#import_main('test_threading') -import_main('test_threading_local') -if have_network_access: - import_main('test_timeout') -import_main('test_urllib') -if have_network_access: - import_main('test_urllib2') -import_main('test_urllib2_localnet') +import all_modules + +for m in all_modules.get_modules(): + assimilate_patched(m) |
