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

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

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 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_smtplib.py ('k') | Lib/test/test_ssl.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 imp 6 import imp
7 import os 7 import os
8 import select 8 import select
9 import signal 9 import signal
10 import socket 10 import socket
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 pid2, status = os.waitpid(pid, 0) 59 pid2, status = os.waitpid(pid, 0)
60 testcase.assertEqual(pid2, pid) 60 testcase.assertEqual(pid2, pid)
61 testcase.assertEqual(72 << 8, status) 61 testcase.assertEqual(72 << 8, status)
62 62
63 63
64 @unittest.skipUnless(threading, 'Threading required for this test.') 64 @unittest.skipUnless(threading, 'Threading required for this test.')
65 class SocketServerTest(unittest.TestCase): 65 class SocketServerTest(unittest.TestCase):
66 """Test all socket servers.""" 66 """Test all socket servers."""
67 67
68 def setUp(self): 68 def setUp(self):
69 signal_alarm(60) # Kill deadlocks after 60 seconds. 69 signal_alarm(20) # Kill deadlocks after 20 seconds.
70 self.port_seed = 0 70 self.port_seed = 0
71 self.test_files = [] 71 self.test_files = []
72 72
73 def tearDown(self): 73 def tearDown(self):
74 signal_alarm(0) # Didn't deadlock. 74 signal_alarm(0) # Didn't deadlock.
75 reap_children() 75 reap_children()
76 76
77 for fn in self.test_files: 77 for fn in self.test_files:
78 try: 78 try:
79 os.remove(fn) 79 os.remove(fn)
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 def test_main(): 277 def test_main():
278 if imp.lock_held(): 278 if imp.lock_held():
279 # If the import lock is held, the threads will hang 279 # If the import lock is held, the threads will hang
280 raise unittest.SkipTest("can't run when import lock is held") 280 raise unittest.SkipTest("can't run when import lock is held")
281 281
282 test.support.run_unittest(SocketServerTest) 282 test.support.run_unittest(SocketServerTest)
283 283
284 if __name__ == "__main__": 284 if __name__ == "__main__":
285 test_main() 285 test_main()
286 signal_alarm(3) # Shutdown shouldn't take more than 3 seconds.
OLDNEW
« no previous file with comments | « Lib/test/test_smtplib.py ('k') | Lib/test/test_ssl.py » ('j') | no next file with comments »

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