Skip to content

Add #region name for generated Python tests #1853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.utbot.python.framework.codegen.model.PythonUserImport
import org.utbot.framework.codegen.domain.TestFramework
import org.utbot.framework.codegen.domain.models.CgMethodTestSet
import org.utbot.framework.plugin.api.ExecutableId
import org.utbot.framework.plugin.api.UtClusterInfo
import org.utbot.framework.plugin.api.UtExecutionSuccess
import org.utbot.framework.plugin.api.util.UtContext
import org.utbot.framework.plugin.api.util.withUtContext
Expand Down Expand Up @@ -200,9 +201,12 @@ object PythonTestGenerationProcessor {
)
val testCode = codegen.pythonGenerateAsStringWithTestReport(
notEmptyTests.map { testSet ->
val intRange = testSet.executions.indices
val clusterInfo = listOf(Pair(UtClusterInfo("FUZZER"), intRange))
CgMethodTestSet(
executableId = methodIds[testSet.method] as ExecutableId,
executions = testSet.executions
executions = testSet.executions,
clustersInfo = clusterInfo,
)
},
allImports
Expand Down Expand Up @@ -299,4 +303,4 @@ object PythonTestGenerationProcessor {
} else {
paths
}
}
}