Add python-eventlet 0.16.1
[packages/trusty/python-eventlet.git] / eventlet / tests / stdlib / all_modules.py
1 def get_modules():
2     test_modules = [
3         'test_select',
4         'test_SimpleHTTPServer',
5         'test_asynchat',
6         'test_asyncore',
7         'test_ftplib',
8         'test_httplib',
9         'test_os',
10         'test_queue',
11         'test_socket_ssl',
12         'test_socketserver',
13         #       'test_subprocess',
14         'test_thread',
15         'test_threading',
16         'test_threading_local',
17         'test_urllib',
18         'test_urllib2_localnet']
19
20     network_modules = [
21         'test_httpservers',
22         'test_socket',
23         'test_ssl',
24         'test_timeout',
25         'test_urllib2']
26
27     # quick and dirty way of testing whether we can access
28     # remote hosts; any tests that try internet connections
29     # will fail if we cannot
30     import socket
31     s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
32     try:
33         s.settimeout(0.5)
34         s.connect(('eventlet.net', 80))
35         s.close()
36         test_modules = test_modules + network_modules
37     except socket.error as e:
38         print("Skipping network tests")
39
40     return test_modules