diff --git a/mypyc/test-data/run-tuples.test b/mypyc/test-data/run-tuples.test index afd3a956b871..5e19ab92b82f 100644 --- a/mypyc/test-data/run-tuples.test +++ b/mypyc/test-data/run-tuples.test @@ -127,16 +127,24 @@ class Inextensible(NamedTuple): x: int [file driver.py] -from typing import ForwardRef, Optional +import sys +from typing import Optional from native import ClassIR, FuncIR, Record +if sys.version_info >= (3, 14): + from test.support import EqualToForwardRef + type_forward_ref = EqualToForwardRef +else: + from typing import ForwardRef + type_forward_ref = ForwardRef + assert Record.__annotations__ == { 'st_mtime': float, 'st_size': int, 'is_borrowed': bool, 'hash': str, 'python_path': tuple, - 'type': ForwardRef('ClassIR'), + 'type': type_forward_ref('ClassIR'), 'method': FuncIR, 'shadow_method': type, 'classes': dict,