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

Method test_partial_evaluation

Lib/test/test_typing.py:7476–7484  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7474 )
7475
7476 def test_partial_evaluation(self):
7477 ref = ForwardRef("list[A]")
7478 with self.assertRaises(NameError):
7479 typing.evaluate_forward_ref(ref)
7480
7481 self.assertEqual(
7482 typing.evaluate_forward_ref(ref, format=annotationlib.Format.FORWARDREF),
7483 list[EqualToForwardRef('A')],
7484 )
7485
7486 def test_with_module(self):
7487 from test.typinganndata import fwdref_module

Callers

nothing calls this directly

Calls 4

EqualToForwardRefClass · 0.90
ForwardRefClass · 0.85
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected