diff --git a/test-data/unit/fine-grained.test b/test-data/unit/fine-grained.test index f5204251304e..370ec744f4d3 100644 --- a/test-data/unit/fine-grained.test +++ b/test-data/unit/fine-grained.test @@ -10836,3 +10836,36 @@ b.py:1: note: function a.f is deprecated: use f1 instead main:1: note: function a.f is deprecated: use f1 instead main:4: note: function a.f is deprecated: use f1 instead == + +[case testDeprecateFunctionAlreadyDecorated] +from b import f +x: str = f() +import b +y: str = b.f() + +[file b.py] +from a import f + +[file a.py] +from typing import Callable + +def d(t: Callable[[], str]) -> Callable[[], str]: ... + +@d +def f() -> str: ... + +[file a.py.2] +from typing import Callable +from typing_extensions import deprecated + +def d(t: Callable[[], str]) -> Callable[[], str]: ... + +@deprecated("deprecated decorated function") +@d +def f() -> str: ... + +[builtins fixtures/tuple.pyi] +[out] +== +main:2: note: deprecated decorated function +main:4: note: deprecated decorated function