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

Method fun

Lib/test/test_context.py:201–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199 c = contextvars.ContextVar('a', default=0)
200
201 def fun():
202 self.assertEqual(c.get(), 0)
203 self.assertIsNone(ctx.get(c))
204
205 c.set(42)
206 self.assertEqual(c.get(), 42)
207 self.assertEqual(ctx.get(c), 42)
208
209 ctx.run(fun)
210

Callers

nothing calls this directly

Calls 12

listClass · 0.85
assertIsNoneMethod · 0.80
assertRaisesRegexMethod · 0.80
assertNotInMethod · 0.80
assertEqualMethod · 0.45
getMethod · 0.45
setMethod · 0.45
runMethod · 0.45
assertRaisesMethod · 0.45
keysMethod · 0.45
resetMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected