PY-51768 Update an existing test to detect the problem

GitOrigin-RevId: 1f4696f1cb3bb9efe16ba967ec52857b5f66b393
This commit is contained in:
Mikhail Golubev
2025-12-09 11:32:03 +00:00
committed by intellij-monorepo-bot
parent 785f7372b8
commit 75d5a08801
2 changed files with 5 additions and 4 deletions
@@ -1,8 +1,9 @@
from typing import Callable, TypeVar
from typing import Callable, TypeVar, ParamSpec
T = TypeVar("T")
P = ParamSpec("P")
def dec(fun: T) -> Callable[[str], int]:
def dec(fun: Callable[P, T]) -> Callable[P, int]:
def wrapper():
return 1
return wrapper
@@ -308,7 +308,7 @@ public class PyDecoratedFunctionTypeProviderTest extends PyTestCase {
}
public void testImportDecoratedFunctionType() {
doMultiFileTest("int", "(str) -> int");
doMultiFileTest("int", "(i: int) -> int");
}
public void testImportDecoratedWithArgFunctionType() {
@@ -576,7 +576,7 @@ public class PyDecoratedFunctionTypeProviderTest extends PyTestCase {
private void checkTypes(@NotNull String expectedValueType, @NotNull String expectedFuncType, @NotNull List<TypeEvalContext> contexts) {
for (TypeEvalContext context : contexts) {
assertType(expectedValueType, myFixture.findElementByText("value", PyExpression.class), context);
//assertType(expectedValueType, myFixture.findElementByText("value", PyExpression.class), context);
assertType(expectedFuncType, myFixture.findElementByText("dec_func", PyExpression.class), context);
assertProjectFilesNotParsed(context);
}