mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Python: ExecService: clean-up test and include into idea-main tests to be run in aggregator
GitOrigin-RevId: 52cacd8b0626a9ca13c29c08d6a60574bae0ed01
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c358ab7fc5
commit
e0e38a7314
@@ -238,5 +238,6 @@
|
||||
<orderEntry type="module" module-name="intellij.grazie" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="intellij.community.wintools" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.compose.ide.plugin" scope="RUNTIME" />
|
||||
<orderEntry type="module" module-name="intellij.python.community.execService" scope="TEST" />
|
||||
</component>
|
||||
</module>
|
||||
+4
-9
@@ -10,7 +10,6 @@ import com.intellij.python.community.execService.WhatToExec
|
||||
import com.intellij.testFramework.common.timeoutRunBlocking
|
||||
import com.intellij.testFramework.junit5.TestApplication
|
||||
import com.jetbrains.python.Result
|
||||
import com.jetbrains.python.errorProcessing.PyError
|
||||
import com.jetbrains.python.getOrThrow
|
||||
import org.hamcrest.CoreMatchers
|
||||
import org.hamcrest.MatcherAssert.assertThat
|
||||
@@ -60,14 +59,10 @@ class ExecServiceShowCase {
|
||||
when (val output = ExecService().execGetStdout(command, listOf(arg))) {
|
||||
is Result.Success -> fail("Execution of bad command should lead to an error")
|
||||
is Result.Failure -> {
|
||||
when (val err = output.error) {
|
||||
is PyError.Message -> fail("Execution of bad command should lead to an execution error, not bare message")
|
||||
is PyError.ExecException -> {
|
||||
val failure = err.execFailure
|
||||
assertEquals(command.command, failure.command, "Wrong command reported")
|
||||
assertEquals("foo", failure.args[0], "Wrong args reported")
|
||||
}
|
||||
}
|
||||
val err = output.error
|
||||
val failure = err.execFailure
|
||||
assertEquals(command.command, failure.command, "Wrong command reported")
|
||||
assertEquals("foo", failure.args[0], "Wrong args reported")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user