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

Method testWithExtendedTargets

Lib/test/test_with.py:702–706  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

700 self.assertEqual(blah.three, 3)
701
702 def testWithExtendedTargets(self):
703 with nullcontext(range(1, 5)) as (a, *b, c):
704 self.assertEqual(a, 1)
705 self.assertEqual(b, [2, 3])
706 self.assertEqual(c, 4)
707
708
709class ExitSwallowsExceptionTestCase(unittest.TestCase):

Callers

nothing calls this directly

Calls 2

nullcontextClass · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected