Skip to content

Commit 264d9a1

Browse files
serhiy-storchakamiss-islington
authored andcommitted
pythongh-94245: Test pickling and copying of typing.Tuple[()] (pythonGH-94259)
(cherry picked from commit 75cb3ab) Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent 4bc5f9f commit 264d9a1

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
@@ -3282,7 +3282,8 @@ class C(B[int]):
32823282
self.assertEqual(x.bar, 'abc')
32833283
self.assertEqual(x.__dict__, {'foo': 42, 'bar': 'abc'})
32843284
samples = [Any, Union, Tuple, Callable, ClassVar,
3285-
Union[int, str], ClassVar[List], Tuple[int, ...], Callable[[str], bytes],
3285+
Union[int, str], ClassVar[List], Tuple[int, ...], Tuple[()],
3286+
Callable[[str], bytes],
32863287
typing.DefaultDict, typing.FrozenSet[int]]
32873288
for s in samples:
32883289
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
@@ -3300,7 +3301,8 @@ class C(B[int]):
33003301
def test_copy_and_deepcopy(self):
33013302
T = TypeVar('T')
33023303
class Node(Generic[T]): ...
3303-
things = [Union[T, int], Tuple[T, int], Callable[..., T], Callable[[int], int],
3304+
things = [Union[T, int], Tuple[T, int], Tuple[()],
3305+
Callable[..., T], Callable[[int], int],
33043306
Tuple[Any, Any], Node[T], Node[int], Node[Any], typing.Iterable[T],
33053307
typing.Iterable[Any], typing.Iterable[int], typing.Dict[int, str],
33063308
typing.Dict[T, Any], ClassVar[int], ClassVar[List[T]], Tuple['T', 'T'],

0 commit comments

Comments
 (0)