mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-51768 Update an existing test to detect the problem
GitOrigin-RevId: 1f4696f1cb3bb9efe16ba967ec52857b5f66b393
This commit is contained in:
committed by
intellij-monorepo-bot
parent
785f7372b8
commit
75d5a08801
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user