PY-86002 Update some tests introduced after PY-24834 to expect legacy unions

(cherry picked from commit 04d02eb3f87e8c38f50e89510c79c2a1c99e3936)

IJ-MR-184619

GitOrigin-RevId: 272214615275714ca0defcb24f6cf3f66d74382d
This commit is contained in:
Mikhail Golubev
2025-12-03 16:07:56 +02:00
committed by intellij-monorepo-bot
parent fd524cbe67
commit 3a75cb758c

View File

@@ -4151,7 +4151,7 @@ public class Py3TypeTest extends PyTestCase {
@TestFor(issues="PY-81651")
public void testEqWithAny() {
// the actual result is `Any`, but we don't have the technology yet
doTest("UnsafeUnion[Any, bool]", """
doTest("bool | Any", """
from typing import Any
class A:
@@ -4281,7 +4281,7 @@ public class Py3TypeTest extends PyTestCase {
@TestFor(issues="PY-28130")
public void testLambdaAsNonAnnotatedFunctionReturnValue() {
RecursionManager.assertOnRecursionPrevention(myFixture.getTestRootDisposable());
doTest("(x: Any) -> UnsafeUnion[int, Any]", """
doTest("(x: Any) -> int | Any", """
def f():
return lambda x: x + 1
expr = f()
@@ -4291,7 +4291,7 @@ public class Py3TypeTest extends PyTestCase {
@TestFor(issues="PY-28130")
public void testLambdaAsNonAnnotatedVariableValue() {
RecursionManager.assertOnRecursionPrevention(myFixture.getTestRootDisposable());
doTest("(x: Any) -> UnsafeUnion[int, Any]", """
doTest("(x: Any) -> int | Any", """
t = lambda x: x + 1
expr = t
""");