mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Python: decouple test-env from UsefulTestCase because it overwrites logger and breaks RD tests
GitOrigin-RevId: 00aac829d9f2e6d0e71f9cf0dd510c73519c7e85
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d066a2f02d
commit
967fd16ddb
@@ -10,10 +10,10 @@
|
||||
<orderEntry type="library" name="kotlin-stdlib" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.util" />
|
||||
<orderEntry type="module" module-name="intellij.python.community" />
|
||||
<orderEntry type="module" module-name="intellij.platform.testFramework" />
|
||||
<orderEntry type="module" module-name="intellij.python.sdk" />
|
||||
<orderEntry type="module" module-name="intellij.platform.execution" />
|
||||
<orderEntry type="library" name="kotlin-reflect" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.lang.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
|
||||
</component>
|
||||
</module>
|
||||
+2
-1
@@ -2,13 +2,14 @@
|
||||
package com.intellij.python.community.testFramework.testEnv
|
||||
|
||||
import com.intellij.python.community.testFramework.testEnv.PyEnvTestSettings.Companion.PATH_TO_TEST_ENV_PYTHON_INTERPRETERS
|
||||
import com.intellij.testFramework.UsefulTestCase.IS_UNDER_TEAMCITY
|
||||
import com.intellij.util.SystemProperties
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import java.io.File
|
||||
|
||||
|
||||
private val IS_UNDER_TEAMCITY: Boolean = System.getenv("TEAMCITY_VERSION") != null
|
||||
|
||||
/**
|
||||
* Configures env test environment using env vars and properties.
|
||||
* Environment variables are also used in gradle script (setup-test-environment)
|
||||
|
||||
+2
-3
@@ -6,7 +6,7 @@ import com.intellij.openapi.projectRoots.SdkType
|
||||
import com.intellij.openapi.projectRoots.impl.SdkConfigurationUtil
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess
|
||||
import com.intellij.testFramework.utils.vfs.refreshAndGetVirtualFile
|
||||
import com.intellij.openapi.vfs.refreshAndFindVirtualFileOrDirectory
|
||||
import com.jetbrains.python.PyNames
|
||||
import com.jetbrains.python.PythonBinary
|
||||
import java.nio.file.Path
|
||||
@@ -14,9 +14,8 @@ import java.nio.file.Path
|
||||
data object TypeVanillaPython3 : PythonType<PythonBinary>("python3") {
|
||||
override suspend fun createSdkFor(python: PythonBinary): Sdk = createSdk(python)
|
||||
|
||||
// TODO: DOC
|
||||
fun createSdk(python: PythonBinary): Sdk =
|
||||
SdkConfigurationUtil.setupSdk(emptyArray(), python.refreshAndGetVirtualFile(),
|
||||
SdkConfigurationUtil.setupSdk(emptyArray(), python.refreshAndFindVirtualFileOrDirectory()!!,
|
||||
SdkType.findByName(PyNames.PYTHON_SDK_ID_NAME)!!, null, null)
|
||||
|
||||
// Python is directly executable
|
||||
|
||||
Reference in New Issue
Block a user