mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[python] PY-87547 debugpy: Debug test shows "ERROR: file or directory not found
Merge-request: IJ-MR-191493 Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com> GitOrigin-RevId: a8437b47a3de1bcd83ebb5a6c5b9a89d6b9ab96b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6f54455fa3
commit
d0927b87e5
+14
-3
@@ -14,6 +14,7 @@ import com.jetbrains.python.testing.PyAbstractTestConfiguration
|
||||
import com.jetbrains.python.testing.PyAbstractTestConfigurationFragmentedEditor
|
||||
import com.jetbrains.python.testing.PyAbstractTestSettingsEditor
|
||||
import com.jetbrains.python.testing.PyTestSharedForm
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
class PyAutoDetectTestConfiguration(project: Project, factory: PyAutoDetectionConfigurationFactory)
|
||||
: PyAbstractTestConfiguration(project, factory) {
|
||||
@@ -21,9 +22,11 @@ class PyAutoDetectTestConfiguration(project: Project, factory: PyAutoDetectionCo
|
||||
// "Autodetect" name is useless
|
||||
override val useFrameworkNameInConfiguration: Boolean = false
|
||||
|
||||
override fun getState(executor: Executor, environment: ExecutionEnvironment): RunProfileState? {
|
||||
val runProfile = environment.runProfile
|
||||
val module = (runProfile as? PyAbstractTestConfiguration)?.module
|
||||
/**
|
||||
* Creates a detected configuration and copies all data from this autodetect configuration.
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
fun prepareDetectedConfiguration(module: Module?): PyAbstractTestConfiguration? {
|
||||
val conf = detectedConfiguration(module) ?: return null
|
||||
|
||||
copyTo(getProperties(conf))
|
||||
@@ -34,6 +37,14 @@ class PyAutoDetectTestConfiguration(project: Project, factory: PyAutoDetectionCo
|
||||
conf.setAddSourceRoots(shouldAddSourceRoots())
|
||||
conf.mappingSettings = mappingSettings
|
||||
conf.beforeRunTasks = beforeRunTasks
|
||||
|
||||
return conf
|
||||
}
|
||||
|
||||
override fun getState(executor: Executor, environment: ExecutionEnvironment): RunProfileState? {
|
||||
val runProfile = environment.runProfile
|
||||
val module = (runProfile as? PyAbstractTestConfiguration)?.module
|
||||
val conf = prepareDetectedConfiguration(module) ?: return null
|
||||
return conf.getState(executor, environment)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user