From 715c481b548159554b60e23ffa81816bf3e6bdca Mon Sep 17 00:00:00 2001 From: Vyacheslav Tamarin Date: Wed, 26 Jul 2023 10:35:09 +0300 Subject: [PATCH] Invert regression suite param --- utbot-cli-python/src/README.md | 4 ++-- .../utbot/cli/language/python/PythonGenerateTestsCommand.kt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/utbot-cli-python/src/README.md b/utbot-cli-python/src/README.md index e469b0c1e6..67c689721d 100644 --- a/utbot-cli-python/src/README.md +++ b/utbot-cli-python/src/README.md @@ -82,9 +82,9 @@ Run generated tests: Expected behaviour for runtime exception. -- `--generate-regression-suite` +- `--do-not-generate-regression-suite` - Generate regression test suite. Default error test suite generation only. + Generate regression test suite or not. Regression suite and error suite generation is active by default. ### `run_python` options diff --git a/utbot-cli-python/src/main/kotlin/org/utbot/cli/language/python/PythonGenerateTestsCommand.kt b/utbot-cli-python/src/main/kotlin/org/utbot/cli/language/python/PythonGenerateTestsCommand.kt index dcd0f8163c..03361d44f7 100644 --- a/utbot-cli-python/src/main/kotlin/org/utbot/cli/language/python/PythonGenerateTestsCommand.kt +++ b/utbot-cli-python/src/main/kotlin/org/utbot/cli/language/python/PythonGenerateTestsCommand.kt @@ -104,7 +104,7 @@ class PythonGenerateTestsCommand : CliktCommand( .choice("PASS", "FAIL") .default("FAIL") - private val generateRegressionSuite by option("--generate-regression-suite", help = "Generate regression test suite") + private val doNotGenerateRegressionSuite by option("--do-not-generate-regression-suite", help = "Do not generate regression test suite") .flag(default = false) private val testFramework: TestFramework @@ -254,11 +254,11 @@ class PythonGenerateTestsCommand : CliktCommand( logger.info("Generating tests...") var testSets = processor.testGenerate(mypyStorage) if (testSets.isEmpty()) return - if (!generateRegressionSuite) { + if (doNotGenerateRegressionSuite) { testSets = testSets.map { testSet -> PythonTestSet( testSet.method, - testSet.executions.filter { it.result is UtExecutionSuccess }, + testSet.executions.filterNot { it.result is UtExecutionSuccess }, testSet.errors, testSet.mypyReport, testSet.classId