Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 72880a3

Browse files
committedJun 25, 2022
pythongh-94245: Test pickling and copying of typing.Tuple[()]
1 parent 50cd4b6 commit 72880a3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎Lib/test/test_typing.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -3288,7 +3288,8 @@ class C(B[int]):
32883288
self.assertEqual(x.bar, 'abc')
32893289
self.assertEqual(x.__dict__, {'foo': 42, 'bar': 'abc'})
32903290
samples = [Any, Union, Tuple, Callable, ClassVar,
3291-
Union[int, str], ClassVar[List], Tuple[int, ...], Callable[[str], bytes],
3291+
Union[int, str], ClassVar[List], Tuple[int, ...], Tuple[()],
3292+
Callable[[str], bytes],
32923293
typing.DefaultDict, typing.FrozenSet[int]]
32933294
for s in samples:
32943295
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
@@ -3306,7 +3307,8 @@ class C(B[int]):
33063307
def test_copy_and_deepcopy(self):
33073308
T = TypeVar('T')
33083309
class Node(Generic[T]): ...
3309-
things = [Union[T, int], Tuple[T, int], Callable[..., T], Callable[[int], int],
3310+
things = [Union[T, int], Tuple[T, int], Tuple[()],
3311+
Callable[..., T], Callable[[int], int],
33103312
Tuple[Any, Any], Node[T], Node[int], Node[Any], typing.Iterable[T],
33113313
typing.Iterable[Any], typing.Iterable[int], typing.Dict[int, str],
33123314
typing.Dict[T, Any], ClassVar[int], ClassVar[List[T]], Tuple['T', 'T'],

0 commit comments

Comments
 (0)
Please sign in to comment.