MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/test/test_asyncio/utils.py:350–371  ·  view source on GitHub ↗
(self, gen=None)

Source from the content-addressed store, hash-verified

348 """
349
350 def __init__(self, gen=None):
351 super().__init__()
352
353 if gen is None:
354 def gen():
355 yield
356 self._check_on_close = False
357 else:
358 self._check_on_close = True
359
360 self._gen = gen()
361 next(self._gen)
362 self._time = 0
363 self._clock_resolution = 1e-9
364 self._timers = []
365 self._selector = TestSelector()
366
367 self.readers = {}
368 self.writers = {}
369 self.reset_counters()
370
371 self._transports = weakref.WeakValueDictionary()
372
373 def time(self):
374 return self._time

Callers

nothing calls this directly

Calls 4

reset_countersMethod · 0.95
superClass · 0.85
TestSelectorClass · 0.85
genFunction · 0.50

Tested by

no test coverage detected