mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Issue #20311: Fix test_telnetlib, set the resolution of the MockSelector
This commit is contained in:
parent
6029e08691
commit
3c2f175ec4
1 changed files with 4 additions and 0 deletions
|
|
@ -116,6 +116,10 @@ class MockSelector(selectors.BaseSelector):
|
|||
def __init__(self):
|
||||
self.keys = {}
|
||||
|
||||
@property
|
||||
def resolution(self):
|
||||
return 1e-3
|
||||
|
||||
def register(self, fileobj, events, data=None):
|
||||
key = selectors.SelectorKey(fileobj, 0, events, data)
|
||||
self.keys[fileobj] = key
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue