Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(113574)

Side by Side Diff: Lib/test/test_socketserver.py

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/test/test_socket.py ('k') | Lib/test/test_source_encoding.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 """ 1 """
2 Test suite for socketserver. 2 Test suite for socketserver.
3 """ 3 """
4 4
5 import contextlib 5 import contextlib
6 import os 6 import os
7 import select 7 import select
8 import signal 8 import signal
9 import socket 9 import socket
10 import select 10 import sys
11 import errno 11 import errno
12 import tempfile 12 import tempfile
13 import unittest 13 import unittest
14 import socketserver 14 import socketserver
15 15
16 import test.support 16 import test.support
17 from test.support import reap_children, reap_threads, verbose 17 from test.support import reap_children, reap_threads, verbose
18 try: 18 try:
19 import threading 19 import threading
20 except ImportError: 20 except ImportError:
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 self.stream_examine) 182 self.stream_examine)
183 183
184 @requires_forking 184 @requires_forking
185 def test_ForkingTCPServer(self): 185 def test_ForkingTCPServer(self):
186 with simple_subprocess(self): 186 with simple_subprocess(self):
187 self.run_server(socketserver.ForkingTCPServer, 187 self.run_server(socketserver.ForkingTCPServer,
188 socketserver.StreamRequestHandler, 188 socketserver.StreamRequestHandler,
189 self.stream_examine) 189 self.stream_examine)
190 190
191 @requires_unix_sockets 191 @requires_unix_sockets
192 @unittest.skipIf(sys.platform == 'ios', "iOS doesn't fully support UNIX sock ets.")
192 def test_UnixStreamServer(self): 193 def test_UnixStreamServer(self):
193 self.run_server(socketserver.UnixStreamServer, 194 self.run_server(socketserver.UnixStreamServer,
194 socketserver.StreamRequestHandler, 195 socketserver.StreamRequestHandler,
195 self.stream_examine) 196 self.stream_examine)
196 197
197 @requires_unix_sockets 198 @requires_unix_sockets
199 @unittest.skipIf(sys.platform == 'ios', "iOS doesn't fully support UNIX sock ets.")
198 def test_ThreadingUnixStreamServer(self): 200 def test_ThreadingUnixStreamServer(self):
199 self.run_server(socketserver.ThreadingUnixStreamServer, 201 self.run_server(socketserver.ThreadingUnixStreamServer,
200 socketserver.StreamRequestHandler, 202 socketserver.StreamRequestHandler,
201 self.stream_examine) 203 self.stream_examine)
202 204
203 @requires_unix_sockets 205 @requires_unix_sockets
204 @requires_forking 206 @requires_forking
205 def test_ForkingUnixStreamServer(self): 207 def test_ForkingUnixStreamServer(self):
206 with simple_subprocess(self): 208 with simple_subprocess(self):
207 self.run_server(ForkingUnixStreamServer, 209 self.run_server(ForkingUnixStreamServer,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 s = socket.socket(server.address_family, socket.SOCK_STREAM) 403 s = socket.socket(server.address_family, socket.SOCK_STREAM)
402 s.connect(server.server_address) 404 s.connect(server.server_address)
403 s.close() 405 s.close()
404 server.handle_request() 406 server.handle_request()
405 self.assertEqual(server.shutdown_called, 1) 407 self.assertEqual(server.shutdown_called, 1)
406 server.server_close() 408 server.server_close()
407 409
408 410
409 if __name__ == "__main__": 411 if __name__ == "__main__":
410 unittest.main() 412 unittest.main()
OLDNEW
« no previous file with comments | « Lib/test/test_socket.py ('k') | Lib/test/test_source_encoding.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+