Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MagicStack/contextvars
/ ctx2_fun
Method
ctx2_fun
tests/test_basics.py:333–336 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
331
self.assertEqual(ctx2[c], 30)
332
333
def
ctx2_fun():
334
self.assertEqual(c.get(), 10)
335
c.set(30)
336
self.assertEqual(c.get(), 30)
337
338
ctx1.run(ctx1_fun)
339
Callers
nothing calls this directly
Calls
2
get
Method · 0.80
set
Method · 0.80
Tested by
no test coverage detected