[python] Fix PoetryPackageManagerTest

In Poetry 2.0, the `--no-update` argument for the `poetry lock` command was removed. Therefore, the command must be run without this argument.


(cherry picked from commit 2e2881b05a063de9a43a3d2bcd06923bec8bb2cd)

IJ-MR-153396

GitOrigin-RevId: 45a77ba3775fa6f7db722d0e6c523c45fc5bee33
This commit is contained in:
Egor.Eliseev
2025-01-22 13:19:56 +02:00
committed by intellij-monorepo-bot
parent 8e2ab92086
commit 5d69e05337

View File

@@ -223,7 +223,9 @@ suspend fun poetryShowOutdated(sdk: Sdk): Result<Map<String, PythonOutdatedPacka
suspend fun poetryListPackages(sdk: Sdk): Result<Pair<List<PyPackage>, List<PyRequirement>>> {
// Just in case there were any changes to pyproject.toml
if (runPoetryWithSdk(sdk, "lock", "--check").isFailure) {
runPoetryWithSdk(sdk, "lock", "--no-update")
if (runPoetryWithSdk(sdk, "lock", "--no-update").isFailure) {
runPoetryWithSdk(sdk, "lock")
}
}
val output = runPoetryWithSdk(sdk, "install", "--dry-run", "--no-root").getOrElse {