Skip to content

Commit 19e9207

Browse files
committed
Move tests to test_typing
1 parent 90bdf0d commit 19e9207

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Lib/test/test_genericalias.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,6 @@ def __deepcopy__(self, memo):
305305
self.assertEqual(copied.__args__, alias.__args__)
306306
self.assertEqual(copied.__parameters__, alias.__parameters__)
307307

308-
def test_copy_with(self):
309-
# bpo-46581
310-
from typing import Callable, ParamSpec
311-
P = ParamSpec('P')
312-
original = Callable[P, int]
313-
copied = original.copy_with((P, int))
314-
self.assertEqual(original.__parameters__, copied.__parameters__)
315-
316308
def test_union(self):
317309
a = typing.Union[list[int], list[str]]
318310
self.assertEqual(a.__args__, (list[int], list[str]))

Lib/test/test_typing.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2802,6 +2802,14 @@ def __init__(self, attr: T) -> None:
28022802
self.assertEqual(deepcopy(ci).attr, 1)
28032803
self.assertEqual(ci.__orig_class__, C[int])
28042804

2805+
def test_copy_with(self):
2806+
# bpo-46581
2807+
from typing import Callable, ParamSpec
2808+
P = ParamSpec('P')
2809+
original = Callable[P, int]
2810+
copied = original.copy_with((P, int))
2811+
self.assertEqual(original.__parameters__, copied.__parameters__)
2812+
28052813
def test_weakref_all(self):
28062814
T = TypeVar('T')
28072815
things = [Any, Union[T, int], Callable[..., T], Tuple[Any, Any],

0 commit comments

Comments
 (0)