Skip to content

Commit 6169b44

Browse files
Address review
1 parent dd079fa commit 6169b44

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

Lib/test/test_typing.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7565,19 +7565,14 @@ def test_evaluate_forward_ref_string_format(self):
75657565
# Test evaluating forward references in STRING format
75667566
# does not 'leak' internal names
75677567
# See https://github.com/python/cpython/issues/150641
7568-
from annotationlib import Format, get_annotations
75697568

75707569
def f(arg: unknown | str | int | list[str] | tuple[int, ...]): ...
75717570

7572-
ref = get_annotations(f, format=Format.FORWARDREF)['arg']
7571+
ref = annotationlib.get_annotations(f, format=annotationlib.Format.FORWARDREF)['arg']
75737572
self.assertEqual(
7574-
typing.evaluate_forward_ref(ref, format=Format.STRING),
7573+
typing.evaluate_forward_ref(ref, format=annotationlib.Format.STRING),
75757574
"unknown | str | int | list[str] | tuple[int, ...]",
75767575
)
7577-
self.assertEqual(
7578-
typing.evaluate_forward_ref(ref, format=Format.STRING),
7579-
ref.__resolved_str__
7580-
)
75817576

75827577
class CollectionsAbcTests(BaseTestCase):
75837578

0 commit comments

Comments
 (0)