MCPcopy Create free account
hub / github.com/MagicStack/contextvars / test_context_getset_2

Method test_context_getset_2

tests/test_basics.py:259–265  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

257
258 @isolated_context
259 def test_context_getset_2(self):
260 v1 = contextvars.ContextVar('v1')
261 v2 = contextvars.ContextVar('v2')
262
263 t1 = v1.set(42)
264 with self.assertRaisesRegex(ValueError, 'by a different'):
265 v2.reset(t1)
266
267 @isolated_context
268 def test_context_getset_3(self):

Callers

nothing calls this directly

Calls 2

setMethod · 0.95
resetMethod · 0.95

Tested by

no test coverage detected