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

Method sub

Lib/test/test_context.py:382–387  ·  view source on GitHub ↗
(num)

Source from the content-addressed store, hash-verified

380 cvar = contextvars.ContextVar('cvar')
381
382 def sub(num):
383 for i in range(10):
384 cvar.set(num + i)
385 time.sleep(random.uniform(0.001, 0.05))
386 self.assertEqual(cvar.get(), num + i)
387 return num
388
389 tp = concurrent.futures.ThreadPoolExecutor(max_workers=10)
390 try:

Callers 15

inject_traceFunction · 0.45
runMethod · 0.45
id_forMethod · 0.45
xcode_testFunction · 0.45
appendMethod · 0.45
format_stringFunction · 0.45
_remove_universal_flagsFunction · 0.45
_override_all_archsFunction · 0.45
formatannotationFunction · 0.45
plainFunction · 0.45

Calls 5

uniformMethod · 0.80
setMethod · 0.45
sleepMethod · 0.45
assertEqualMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected