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

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

Issue 22043: Use a monotonic clock to compute timeouts
Patch Set: Created 3 years, 2 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/telnetlib.py ('k') | Lib/threading.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 import errno 1 import errno
2 import os 2 import os
3 import random 3 import random
4 import selectors 4 import selectors
5 import signal 5 import signal
6 import socket 6 import socket
7 from test import support 7 from test import support
8 from time import sleep 8 from time import sleep
9 import unittest 9 import unittest
10 import unittest.mock 10 import unittest.mock
11 try: 11 from time import monotonic as time
12 from time import monotonic as time
13 except ImportError:
14 from time import time as time
15 try: 12 try:
16 import resource 13 import resource
17 except ImportError: 14 except ImportError:
18 resource = None 15 resource = None
19 16
20 17
21 if hasattr(socket, 'socketpair'): 18 if hasattr(socket, 'socketpair'):
22 socketpair = socket.socketpair 19 socketpair = socket.socketpair
23 else: 20 else:
24 def socketpair(family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0): 21 def socketpair(family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0):
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 def test_main(): 449 def test_main():
453 tests = [DefaultSelectorTestCase, SelectSelectorTestCase, 450 tests = [DefaultSelectorTestCase, SelectSelectorTestCase,
454 PollSelectorTestCase, EpollSelectorTestCase, 451 PollSelectorTestCase, EpollSelectorTestCase,
455 KqueueSelectorTestCase, DevpollSelectorTestCase] 452 KqueueSelectorTestCase, DevpollSelectorTestCase]
456 support.run_unittest(*tests) 453 support.run_unittest(*tests)
457 support.reap_children() 454 support.reap_children()
458 455
459 456
460 if __name__ == "__main__": 457 if __name__ == "__main__":
461 test_main() 458 test_main()
OLDNEW
« no previous file with comments | « Lib/telnetlib.py ('k') | Lib/threading.py » ('j') | no next file with comments »

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