8000 fix test · python/cpython@bf260fb · GitHub
[go: up one dir, main page]

Skip to content

Commit bf260fb

Browse files
committed
fix test
1 parent d27ffd8 commit bf260fb

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Lib/test/test_annotationlib.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ def test_pep_695_generics_with_future_annotations_nested_in_function(self):
10861086
set(results.generic_func.__type_params__),
10871087
)
10881088

1089-
maxDiff = None
1089+
maxDiff = None
10901090

10911091
def test_partial_evaluation(self):
10921092
def f(
@@ -1126,10 +1126,19 @@ def f(
11261126

11271127
def test_partial_evaluation_cell(self):
11281128
obj = object()
1129+
11291130
class RaisesAttributeError:
11301131
attriberr: obj.missing
1132+
11311133
anno = get_annotations(RaisesAttributeError, format=Format.FORWARDREF)
1132-
self.assertEqual(anno, None)
1134+
self.assertEqual(
1135+
anno,
1136+
{
1137+
"attriberr": support.EqualToForwardRef(
1138+
"obj.missing", is_class=True, owner=RaisesAttributeError
1139+
)
1140+
},
1141+
)
11331142

11341143

11351144
class TestCallEvaluateFunction(unittest.TestCase):

0 commit comments

Comments
 (0)
0