From bc9476dc36de3deef94cd1ab858c9e4168c5aafa Mon Sep 17 00:00:00 2001 From: "Ilya.Kazakevich" Date: Sun, 19 Jan 2025 15:49:54 +0100 Subject: [PATCH] Python tests: kill process that locked the file GitOrigin-RevId: eee36992c1756b2cd81112eca851dd7dbc85efec --- .../env/systemPython/SystemPythonServiceShowCaseTest.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/services/system-python/tests/com/intellij/python/junit5Tests/env/systemPython/SystemPythonServiceShowCaseTest.kt b/python/services/system-python/tests/com/intellij/python/junit5Tests/env/systemPython/SystemPythonServiceShowCaseTest.kt index ecc76a5510ad..bc214c888bbd 100644 --- a/python/services/system-python/tests/com/intellij/python/junit5Tests/env/systemPython/SystemPythonServiceShowCaseTest.kt +++ b/python/services/system-python/tests/com/intellij/python/junit5Tests/env/systemPython/SystemPythonServiceShowCaseTest.kt @@ -2,6 +2,7 @@ package com.intellij.python.junit5Tests.env.systemPython import com.intellij.openapi.diagnostic.fileLogger +import com.intellij.openapi.util.SystemInfo import com.intellij.platform.eel.executeProcess import com.intellij.platform.eel.getOrThrow import com.intellij.platform.eel.provider.getEelDescriptor @@ -10,6 +11,7 @@ import com.intellij.python.community.services.systemPython.SystemPythonService import com.intellij.python.junit5Tests.assertFail import com.intellij.python.junit5Tests.framework.env.PyEnvTestCase import com.intellij.python.junit5Tests.framework.env.PythonBinaryPath +import com.intellij.python.junit5Tests.framework.winLockedFile.deleteCheckLocking import com.intellij.python.junit5Tests.randomBinary import com.intellij.testFramework.common.timeoutRunBlocking import com.jetbrains.python.psi.LanguageLevel @@ -60,5 +62,9 @@ class SystemPythonServiceShowCaseTest { allPythons = SystemPythonService().findSystemPythons() assertThat("Broken python returned", allPythons, not(hasItem(newPython))) + + if (SystemInfo.isWindows) { + deleteCheckLocking(venvPath) + } } } \ No newline at end of file