We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
del
1 parent 1c79ac7 commit 2630802Copy full SHA for 2630802
1 file changed
Lib/test/test_annotationlib.py
@@ -1929,11 +1929,6 @@ def test_fwdref_invalid_syntax(self):
1929
def test_re_evaluate_generics(self):
1930
global global_alias
1931
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
-
1937
class C:
1938
x: global_alias[int]
1939
@@ -1946,6 +1941,9 @@ class C:
1946
1941
global_alias = list
1947
1942
self.assertEqual(evaluated.evaluate(), list[int])
1948
1943
1944
+ # If we run this test again, ensure the type is still undefined
1945
+ del global_alias
+
1949
1950
class TestAnnotationLib(unittest.TestCase):
1951
def test__all__(self):
0 commit comments