Skip to content

Commit ad0431d

Browse files
committed
Recraft test to not depend on internal details
1 parent b222b3d commit ad0431d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_typing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2802,11 +2802,12 @@ 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):
2805+
def test_parameter_propagation(self):
28062806
# bpo-46581
28072807
P = ParamSpec('P')
28082808
original = Callable[P, int]
2809-
copied = original.copy_with((P, int))
2809+
self.assertEqual(original.__parameters__, (P,))
2810+
copied = original[P]
28102811
self.assertEqual(original.__parameters__, copied.__parameters__)
28112812

28122813
def test_weakref_all(self):

0 commit comments

Comments
 (0)