Skip to content

Commit 2630802

Browse files
committed
Update del to end of test_re_evaluate_generics
1 parent 1c79ac7 commit 2630802

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

Lib/test/test_annotationlib.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,11 +1929,6 @@ def test_fwdref_invalid_syntax(self):
19291929
def test_re_evaluate_generics(self):
19301930
global global_alias
19311931

1932-
# If we've already run this test before,
1933-
# ensure the variable is still undefined
1934-
if "global_alias" in globals():
1935-
del global_alias
1936-
19371932
class C:
19381933
x: global_alias[int]
19391934

@@ -1946,6 +1941,9 @@ class C:
19461941
global_alias = list
19471942
self.assertEqual(evaluated.evaluate(), list[int])
19481943

1944+
# If we run this test again, ensure the type is still undefined
1945+
del global_alias
1946+
19491947

19501948
class TestAnnotationLib(unittest.TestCase):
19511949
def test__all__(self):

0 commit comments

Comments
 (0)