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

Method test_forward_equality

Lib/test/test_annotationlib.py:1837–1844  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1835 ForwardRef(1) # only `str` type is allowed
1836
1837 def test_forward_equality(self):
1838 fr = ForwardRef("int")
1839 self.assertEqual(fr, ForwardRef("int"))
1840 self.assertNotEqual(List["int"], List[int])
1841 self.assertNotEqual(fr, ForwardRef("int", module=__name__))
1842 frm = ForwardRef("int", module=__name__)
1843 self.assertEqual(frm, ForwardRef("int", module=__name__))
1844 self.assertNotEqual(frm, ForwardRef("int", module="__other_name__"))
1845
1846 def test_forward_equality_get_type_hints(self):
1847 c1 = ForwardRef("C")

Callers

nothing calls this directly

Calls 3

ForwardRefClass · 0.90
assertNotEqualMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected