From e20757eeaee1324290f0863098bb785d9c3b63ff Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Mon, 19 Dec 2022 18:59:29 +0300 Subject: [PATCH 01/15] Change database path in python coverage module --- .../src/main/kotlin/org/utbot/python/PythonEvaluation.kt | 7 ++++++- .../src/main/kotlin/org/utbot/python/code/CodeGen.kt | 6 ++++-- .../python/framework/codegen/model/PythonCodeGenerator.kt | 6 ++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt b/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt index 675718fa9c..e4138ca25f 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt @@ -64,13 +64,18 @@ fun startEvaluationProcess(input: EvaluationInput): EvaluationProcess { tag = "out_" + input.method.name + ".py", addToCleaner = false ) + val coverageDatabasePath = TemporaryFileManager.assignTemporaryFile( + tag = "coverage_db_" + input.method.name, + addToCleaner = false, + ) val runCode = PythonCodeGenerator.generateRunFunctionCode( input.method, input.methodArguments, input.directoriesForSysPath, input.moduleToImport, input.additionalModulesToImport, - fileForOutput.path.replace("\\", "\\\\") + fileForOutput.path.replace("\\", "\\\\"), + coverageDatabasePath.absolutePath ) val fileWithCode = TemporaryFileManager.createTemporaryFile( runCode, diff --git a/utbot-python/src/main/kotlin/org/utbot/python/code/CodeGen.kt b/utbot-python/src/main/kotlin/org/utbot/python/code/CodeGen.kt index 0975f817a7..790faddb19 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/code/CodeGen.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/code/CodeGen.kt @@ -20,7 +20,8 @@ object PythonCodeGenerator { directoriesForSysPath: Set, moduleToImport: String, additionalModules: Set = emptySet(), - fileForOutputName: String + fileForOutputName: String, + coverageDatabasePath: String, ): String { val context = UtContext(this::class.java.classLoader) withUtContext(context) { @@ -36,7 +37,8 @@ object PythonCodeGenerator { directoriesForSysPath, moduleToImport, additionalModules, - fileForOutputName + fileForOutputName, + coverageDatabasePath, ) } } diff --git a/utbot-python/src/main/kotlin/org/utbot/python/framework/codegen/model/PythonCodeGenerator.kt b/utbot-python/src/main/kotlin/org/utbot/python/framework/codegen/model/PythonCodeGenerator.kt index ec4694f3e5..6e7775cc17 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/framework/codegen/model/PythonCodeGenerator.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/framework/codegen/model/PythonCodeGenerator.kt @@ -104,7 +104,8 @@ class PythonCodeGenerator( directoriesForSysPath: Set, moduleToImport: String, additionalModules: Set = emptySet(), - fileForOutputName: String + fileForOutputName: String, + coverageDatabasePath: String, ): String { val cgRendererContext = CgRendererContext.fromCgContext(context) val printer = CgPrinterImpl() @@ -144,13 +145,14 @@ class PythonCodeGenerator( ) val fullpath = CgLiteral(pythonStrClassId, "'${method.moduleFilename}'") - val outputPath = CgLiteral(pythonStrClassId, "'$fileForOutputName'") + val databasePath = CgLiteral(pythonStrClassId, "'$coverageDatabasePath'") val executorCall = CgPythonFunctionCall( pythonNoneClassId, executorFunctionName, listOf( + databasePath, functionName, args, kwargs, From dfdfe5f1c6342675d037479ac1c394ce895b609c Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Mon, 19 Dec 2022 19:02:01 +0300 Subject: [PATCH 02/15] Skip PR #1545 changes in GenerateTestsAction.update --- .../org/utbot/intellij/plugin/ui/actions/GenerateTestsAction.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/actions/GenerateTestsAction.kt b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/actions/GenerateTestsAction.kt index 7d32d7e2f1..03fb0494cc 100644 --- a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/actions/GenerateTestsAction.kt +++ b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/actions/GenerateTestsAction.kt @@ -13,7 +13,7 @@ class GenerateTestsAction : AnAction() { override fun update(e: AnActionEvent) { val languageAssistant = LanguageAssistant.get(e) - if (languageAssistant == null || !accessByProjectSettings(e)) { + if (languageAssistant == null) { e.presentation.isEnabled = false } else { languageAssistant.update(e) From a6e647dde26cfc4534ce746821e39db5203b891a Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Mon, 19 Dec 2022 19:37:45 +0300 Subject: [PATCH 03/15] Reverse PR #1545 changes --- .../org/utbot/intellij/plugin/ui/actions/GenerateTestsAction.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/actions/GenerateTestsAction.kt b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/actions/GenerateTestsAction.kt index 03fb0494cc..7d32d7e2f1 100644 --- a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/actions/GenerateTestsAction.kt +++ b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/actions/GenerateTestsAction.kt @@ -13,7 +13,7 @@ class GenerateTestsAction : AnAction() { override fun update(e: AnActionEvent) { val languageAssistant = LanguageAssistant.get(e) - if (languageAssistant == null) { + if (languageAssistant == null || !accessByProjectSettings(e)) { e.presentation.isEnabled = false } else { languageAssistant.update(e) From 439a07d4fc0d5bf44dd8fb0fd69c587703f87881 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Tue, 20 Dec 2022 12:22:30 +0300 Subject: [PATCH 04/15] Update requirements.txt --- utbot-python/src/main/resources/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utbot-python/src/main/resources/requirements.txt b/utbot-python/src/main/resources/requirements.txt index b57d6cc74b..a4ad46e1ba 100644 --- a/utbot-python/src/main/resources/requirements.txt +++ b/utbot-python/src/main/resources/requirements.txt @@ -1,5 +1,5 @@ -mypy==0.971 +mypy>=0.971 astor typeshed-client coverage -utbot-executor \ No newline at end of file +utbot-executor==0.1.4 \ No newline at end of file From dcb8ea360524f4664c5e3a8c7c7cad9e44e98c54 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Mon, 19 Dec 2022 05:20:17 -0800 Subject: [PATCH 05/15] Add logging --- .../src/main/kotlin/org/utbot/python/PythonEvaluation.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt b/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt index e4138ca25f..e67835d0a4 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt @@ -1,6 +1,7 @@ package org.utbot.python import com.beust.klaxon.Klaxon +import mu.KotlinLogging import org.utbot.framework.plugin.api.Coverage import org.utbot.framework.plugin.api.Instruction import org.utbot.framework.plugin.api.UtModel @@ -15,6 +16,7 @@ import org.utbot.python.utils.getResult import org.utbot.python.utils.startProcess import java.io.File +private val logger = KotlinLogging.logger {} sealed class PythonEvaluationResult @@ -113,7 +115,14 @@ fun calculateCoverage(statements: List, missedStatements: List, input: } fun getEvaluationResult(input: EvaluationInput, process: EvaluationProcess, timeout: Long): PythonEvaluationResult { + logger.info("Start evaluation ${input.method.name} with ${input.methodArguments}") val result = getResult(process.process, timeout = timeout) + logger.info { + "Evaluation with arguments ${input.methodArguments} finished:" + "Exit value: ${result.exitValue}" + "Stdout: ${result.stdout}" + "Stderr: ${result.stderr}" + } process.fileWithCode.delete() if (result.terminatedByTimeout) From e9b5f521385e9eadf9834f3ab5f45130546dadb6 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Mon, 19 Dec 2022 05:32:54 -0800 Subject: [PATCH 06/15] Add logging --- .../main/kotlin/org/utbot/python/PythonEvaluation.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt b/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt index e67835d0a4..bc612a3ebf 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt @@ -117,12 +117,12 @@ fun calculateCoverage(statements: List, missedStatements: List, input: fun getEvaluationResult(input: EvaluationInput, process: EvaluationProcess, timeout: Long): PythonEvaluationResult { logger.info("Start evaluation ${input.method.name} with ${input.methodArguments}") val result = getResult(process.process, timeout = timeout) - logger.info { - "Evaluation with arguments ${input.methodArguments} finished:" - "Exit value: ${result.exitValue}" - "Stdout: ${result.stdout}" + logger.info( + "Evaluation with arguments ${input.methodArguments} finished; " + + "Exit value: ${result.exitValue}; " + + "Stdout: ${result.stdout}; " + "Stderr: ${result.stderr}" - } + ) process.fileWithCode.delete() if (result.terminatedByTimeout) @@ -147,6 +147,8 @@ fun getEvaluationResult(input: EvaluationInput, process: EvaluationProcess, time val status = output[0] + logger.info("Evaluation status: $status") + if (status != PythonCodeGenerator.successStatus && status != PythonCodeGenerator.failStatus) return PythonEvaluationError( 0, From 21aa2e5af48a09635903954693362b4e7def8d01 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Tue, 20 Dec 2022 17:12:35 +0300 Subject: [PATCH 07/15] Update requirements.txt --- utbot-python/src/main/resources/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utbot-python/src/main/resources/requirements.txt b/utbot-python/src/main/resources/requirements.txt index a4ad46e1ba..0f681f656a 100644 --- a/utbot-python/src/main/resources/requirements.txt +++ b/utbot-python/src/main/resources/requirements.txt @@ -1,5 +1,5 @@ -mypy>=0.971 +mypy==0.971 astor typeshed-client -coverage -utbot-executor==0.1.4 \ No newline at end of file +coverage==7.0.0 +utbot-executor==0.1.6 \ No newline at end of file From 50d0b9be62920d6f17a9f4009f0862eecc1988cd Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Tue, 20 Dec 2022 06:47:37 -0800 Subject: [PATCH 08/15] Update requirements.txt and fix unicode symbol with \ --- .../src/main/kotlin/org/utbot/python/PythonEvaluation.kt | 2 +- utbot-python/src/main/resources/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt b/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt index bc612a3ebf..3ede23f1bd 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt @@ -77,7 +77,7 @@ fun startEvaluationProcess(input: EvaluationInput): EvaluationProcess { input.moduleToImport, input.additionalModulesToImport, fileForOutput.path.replace("\\", "\\\\"), - coverageDatabasePath.absolutePath + coverageDatabasePath.absolutePath.replace("\\", "\\\\") ) val fileWithCode = TemporaryFileManager.createTemporaryFile( runCode, diff --git a/utbot-python/src/main/resources/requirements.txt b/utbot-python/src/main/resources/requirements.txt index 0f681f656a..c32db78b1b 100644 --- a/utbot-python/src/main/resources/requirements.txt +++ b/utbot-python/src/main/resources/requirements.txt @@ -1,5 +1,5 @@ mypy==0.971 astor typeshed-client -coverage==7.0.0 +coverage utbot-executor==0.1.6 \ No newline at end of file From b548bb9530998006245e2a2979110b505d524c95 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Wed, 21 Dec 2022 11:12:28 +0300 Subject: [PATCH 09/15] Delete sub files from temporary directory --- .../main/kotlin/org/utbot/python/utils/TemporaryFileManager.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/utbot-python/src/main/kotlin/org/utbot/python/utils/TemporaryFileManager.kt b/utbot-python/src/main/kotlin/org/utbot/python/utils/TemporaryFileManager.kt index e46b5bd987..3c315b490a 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/utils/TemporaryFileManager.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/utils/TemporaryFileManager.kt @@ -12,6 +12,7 @@ object TemporaryFileManager { fun setup() { tmpDirectory = FileUtil.createTempDirectory("python-test-generation-${nextId++}") + Cleaner.addFunction { tmpDirectory.toFile().listFiles()?.forEach { it.delete() } } Cleaner.addFunction { tmpDirectory.deleteExisting() } } From 0d52e6aebc16f04742743bdf5ebb24e1d9aa7f03 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Wed, 21 Dec 2022 11:15:56 +0300 Subject: [PATCH 10/15] Replace \ to \\ in module path --- .../utbot/python/framework/codegen/model/PythonCodeGenerator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utbot-python/src/main/kotlin/org/utbot/python/framework/codegen/model/PythonCodeGenerator.kt b/utbot-python/src/main/kotlin/org/utbot/python/framework/codegen/model/PythonCodeGenerator.kt index 6e7775cc17..25b43410f6 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/framework/codegen/model/PythonCodeGenerator.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/framework/codegen/model/PythonCodeGenerator.kt @@ -144,7 +144,7 @@ class PythonCodeGenerator( arguments.associateBy { argument -> CgLiteral(pythonStrClassId, "'${argument.name}'") } ) - val fullpath = CgLiteral(pythonStrClassId, "'${method.moduleFilename}'") + val fullpath = CgLiteral(pythonStrClassId, "'${method.moduleFilename.replace("\\", "\\\\")}'") val outputPath = CgLiteral(pythonStrClassId, "'$fileForOutputName'") val databasePath = CgLiteral(pythonStrClassId, "'$coverageDatabasePath'") From db5c59177651a71a3219099a49ac94b293ba004b Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Wed, 21 Dec 2022 11:22:06 +0300 Subject: [PATCH 11/15] Update logging --- .../src/main/kotlin/org/utbot/python/PythonEngine.kt | 5 ++++- .../main/kotlin/org/utbot/python/PythonEvaluation.kt | 12 ------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/utbot-python/src/main/kotlin/org/utbot/python/PythonEngine.kt b/utbot-python/src/main/kotlin/org/utbot/python/PythonEngine.kt index 8df65cf71b..21ebbd710e 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/PythonEngine.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/PythonEngine.kt @@ -177,11 +177,14 @@ class PythonEngine( when(val evaluationResult = jobResult.evalResult) { is PythonEvaluationError -> { if (evaluationResult.status != 0) { + val errorMessage = "Error evaluation: ${evaluationResult.status}, ${evaluationResult.message}" + logger.info { "Python evaluation error: $errorMessage" } yield(UtError( - "Error evaluation: ${evaluationResult.status}, ${evaluationResult.message}", + errorMessage, Throwable(evaluationResult.stackTrace.joinToString("\n")) )) } else { + logger.info { "Python evaluation error: ${evaluationResult.message}" } yield( UtError( evaluationResult.message, diff --git a/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt b/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt index 3ede23f1bd..8f8718bc56 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/PythonEvaluation.kt @@ -1,7 +1,6 @@ package org.utbot.python import com.beust.klaxon.Klaxon -import mu.KotlinLogging import org.utbot.framework.plugin.api.Coverage import org.utbot.framework.plugin.api.Instruction import org.utbot.framework.plugin.api.UtModel @@ -16,8 +15,6 @@ import org.utbot.python.utils.getResult import org.utbot.python.utils.startProcess import java.io.File -private val logger = KotlinLogging.logger {} - sealed class PythonEvaluationResult class PythonEvaluationError( @@ -115,14 +112,7 @@ fun calculateCoverage(statements: List, missedStatements: List, input: } fun getEvaluationResult(input: EvaluationInput, process: EvaluationProcess, timeout: Long): PythonEvaluationResult { - logger.info("Start evaluation ${input.method.name} with ${input.methodArguments}") val result = getResult(process.process, timeout = timeout) - logger.info( - "Evaluation with arguments ${input.methodArguments} finished; " + - "Exit value: ${result.exitValue}; " + - "Stdout: ${result.stdout}; " + - "Stderr: ${result.stderr}" - ) process.fileWithCode.delete() if (result.terminatedByTimeout) @@ -147,8 +137,6 @@ fun getEvaluationResult(input: EvaluationInput, process: EvaluationProcess, time val status = output[0] - logger.info("Evaluation status: $status") - if (status != PythonCodeGenerator.successStatus && status != PythonCodeGenerator.failStatus) return PythonEvaluationError( 0, From d5325d75efb0fc5a0df18e729cfdb7a836818d9c Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Wed, 21 Dec 2022 11:33:14 +0300 Subject: [PATCH 12/15] Update requirements.txt --- utbot-python/src/main/resources/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utbot-python/src/main/resources/requirements.txt b/utbot-python/src/main/resources/requirements.txt index c32db78b1b..fd07ece0d6 100644 --- a/utbot-python/src/main/resources/requirements.txt +++ b/utbot-python/src/main/resources/requirements.txt @@ -2,4 +2,4 @@ mypy==0.971 astor typeshed-client coverage -utbot-executor==0.1.6 \ No newline at end of file +utbot-executor==0.1.7 \ No newline at end of file From aa71c5c9a3d115065c8c388e69d95266a22433c4 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Wed, 21 Dec 2022 12:45:58 +0300 Subject: [PATCH 13/15] Add requirements message --- .../intellij/plugin/language/python/PythonDialogProcessor.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utbot-intellij-python/src/main/kotlin/org/utbot/intellij/plugin/language/python/PythonDialogProcessor.kt b/utbot-intellij-python/src/main/kotlin/org/utbot/intellij/plugin/language/python/PythonDialogProcessor.kt index f81b66116d..afa0ad3a08 100644 --- a/utbot-intellij-python/src/main/kotlin/org/utbot/intellij/plugin/language/python/PythonDialogProcessor.kt +++ b/utbot-intellij-python/src/main/kotlin/org/utbot/intellij/plugin/language/python/PythonDialogProcessor.kt @@ -233,7 +233,10 @@ object PythonDialogProcessor { if (installResult.exitValue != 0) { showErrorDialogLater( project, - "Requirements installing failed", + "Requirements installing failed.
" + + "${installResult.stderr}

" + + "Try to install with pip:
" + + " ${requirements.joinToString("
")}", "Requirements error" ) } From a25174e4bdc926a15a4bdb2ed8eb15769c7e0d41 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Wed, 21 Dec 2022 12:51:17 +0300 Subject: [PATCH 14/15] Update deleting temporary directory --- .../kotlin/org/utbot/python/utils/TemporaryFileManager.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utbot-python/src/main/kotlin/org/utbot/python/utils/TemporaryFileManager.kt b/utbot-python/src/main/kotlin/org/utbot/python/utils/TemporaryFileManager.kt index 3c315b490a..b508f47137 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/utils/TemporaryFileManager.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/utils/TemporaryFileManager.kt @@ -4,7 +4,6 @@ import org.utbot.common.FileUtil import java.io.File import java.nio.file.Path import java.nio.file.Paths -import kotlin.io.path.deleteExisting object TemporaryFileManager { private lateinit var tmpDirectory: Path @@ -12,8 +11,7 @@ object TemporaryFileManager { fun setup() { tmpDirectory = FileUtil.createTempDirectory("python-test-generation-${nextId++}") - Cleaner.addFunction { tmpDirectory.toFile().listFiles()?.forEach { it.delete() } } - Cleaner.addFunction { tmpDirectory.deleteExisting() } + Cleaner.addFunction { tmpDirectory.toFile().deleteRecursively() } } fun assignTemporaryFile(fileName_: String? = null, tag: String? = null, addToCleaner: Boolean = true): File { From bb2bfde86cca6681b24d805be51d756f5a4fa2f7 Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Wed, 21 Dec 2022 03:43:27 -0800 Subject: [PATCH 15/15] Update error message --- utbot-python/src/main/kotlin/org/utbot/python/PythonEngine.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utbot-python/src/main/kotlin/org/utbot/python/PythonEngine.kt b/utbot-python/src/main/kotlin/org/utbot/python/PythonEngine.kt index 21ebbd710e..44912137c1 100644 --- a/utbot-python/src/main/kotlin/org/utbot/python/PythonEngine.kt +++ b/utbot-python/src/main/kotlin/org/utbot/python/PythonEngine.kt @@ -177,8 +177,8 @@ class PythonEngine( when(val evaluationResult = jobResult.evalResult) { is PythonEvaluationError -> { if (evaluationResult.status != 0) { - val errorMessage = "Error evaluation: ${evaluationResult.status}, ${evaluationResult.message}" - logger.info { "Python evaluation error: $errorMessage" } + val errorMessage = "Error evaluation: ${evaluationResult.status}, ${evaluationResult.message}, ${evaluationResult.stackTrace}" + logger.info { errorMessage } yield(UtError( errorMessage, Throwable(evaluationResult.stackTrace.joinToString("\n"))