MCPcopy Index your code
hub / github.com/RustPython/RustPython / sub

Method sub

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

Source from the content-addressed store, hash-verified

360 cvar = contextvars.ContextVar('cvar')
361
362 def sub(num):
363 for i in range(10):
364 cvar.set(num + i)
365 time.sleep(random.uniform(0.001, 0.05))
366 self.assertEqual(cvar.get(), num + i)
367 return num
368
369 tp = concurrent.futures.ThreadPoolExecutor(max_workers=10)
370 try:

Callers 15

appendMethod · 0.45
format_stringFunction · 0.45
_remove_universal_flagsFunction · 0.45
_override_all_archsFunction · 0.45
formatannotationFunction · 0.45
getdocFunction · 0.45
stripidFunction · 0.45
repr_stringMethod · 0.45
_indentFunction · 0.45
check_outputMethod · 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