Skip to content

Commit aeb602b

Browse files
authored
Remove whitespace test_typing.py
1 parent 37b760c commit aeb602b

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

Lib/test/test_typing.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10778,39 +10778,32 @@ def test_union(self):
1077810778
fwd_ref_1 = ForwardRef('MyType')
1077910779
fwd_ref_2 = ForwardRef('int')
1078010780
union_type = Union[fwd_ref_1, fwd_ref_2]
10781-
1078210781
result = _eval_type(union_type, globals(), locals())
1078310782
self.assertEqual(result, Union[MyType, int], f"Expected Union[MyType, int], got {result}")
1078410783

1078510784
def test_recursive_forward_ref(self):
1078610785
recursive_ref = ForwardRef('RecursiveType')
1078710786
globals()['RecursiveType'] = recursive_ref
10788-
1078910787
recursive_type = Dict[str, List[recursive_ref]]
10790-
1079110788
result = _eval_type(recursive_type, globals(), locals(), recursive_guard={recursive_ref})
10792-
1079310789
self.assertEqual(result, Dict[str, List[recursive_ref]], f"Expected Dict[str, List[RecursiveType]], got {result}")
1079410790

1079510791
def test_callable_unpacking(self):
1079610792
fwd_ref = ForwardRef('MyType')
1079710793
callable_type = Callable[[fwd_ref, int], str]
1079810794
result = _eval_type(callable_type, globals(), locals())
10799-
1080010795
self.assertEqual(result, Callable[[MyType, int], str], f"Expected Callable[[MyType, int], str], got {result}")
1080110796

1080210797
def test_unpacked_generic(self):
1080310798
fwd_ref = ForwardRef('MyType')
1080410799
generic_type = Tuple[fwd_ref, int]
10805-
1080610800
result = _eval_type(generic_type, globals(), locals())
1080710801
self.assertEqual(result, Tuple[MyType, int], f"Expected Tuple[MyType, int], got {result}")
1080810802

1080910803
def test_preservation_of_type(self):
1081010804
fwd_ref_1 = ForwardRef('MyType')
1081110805
fwd_ref_2 = ForwardRef('int')
1081210806
complex_type = Dict[str, Union[fwd_ref_1, fwd_ref_2]]
10813-
1081410807
result = _eval_type(complex_type, globals(), locals())
1081510808
self.assertEqual(result, Dict[str, Union[MyType, int]], f"Expected Dict[str, Union[MyType, int]], got {result}")
1081610809

0 commit comments

Comments
 (0)