Skip to content

Commit 3103934

Browse files
committed
Leave test.support dependency for now
This is not strictly required for the current workflow to work so might as well keep the status quo
1 parent bb7c7dd commit 3103934

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/test_typing_extensions.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8844,12 +8844,9 @@ def test_name_lookup_without_eval(self):
88448844
self.assertIs(evaluate_forward_ref(typing.ForwardRef("int"), globals={"int": str}), str)
88458845
import builtins
88468846

8847-
real_int = builtins.int
8848-
try:
8849-
builtins.int = dict
8847+
from test import support
8848+
with support.swap_attr(builtins, "int", dict):
88508849
self.assertIs(evaluate_forward_ref(typing.ForwardRef("int")), dict)
8851-
finally:
8852-
builtins.int = real_int
88538850

88548851
def test_nested_strings(self):
88558852
# This variable must have a different name TypeVar

0 commit comments

Comments
 (0)