Skip to content

Commit 72c4066

Browse files
authored
Fix python small bugs (#2029)
1 parent 6a8d6e3 commit 72c4066

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

utbot-python/src/main/kotlin/org/utbot/python/fuzzing/provider/TupleFixSizeValueProvider.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ object TupleFixSizeValueProvider : ValueProvider<Type, PythonFuzzedValue, Python
3333
)
3434
},
3535
modify = modifications.asSequence(),
36-
empty = Routine.Empty { PythonFuzzedValue(
37-
PythonTree.TupleNode(emptyMap<Int, PythonTree.PythonTreeNode>().toMutableMap()),
38-
"%var% = ${type.pythonTypeRepresentation()}"
39-
)}
36+
empty = Routine.Empty { PythonFuzzedValue(PythonTree.FakeNode) }
4037
))
4138
}
4239
}

utbot-python/src/main/kotlin/org/utbot/python/fuzzing/provider/utils/SummaryGeneration.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.utbot.python.fuzzing.provider.utils
22

33
import org.utbot.fuzzing.seeds.BitVectorValue
4-
import org.utbot.fuzzing.seeds.Bool
54
import org.utbot.fuzzing.seeds.DefaultFloatBound
65
import org.utbot.fuzzing.seeds.IEEE754Value
76
import org.utbot.fuzzing.seeds.KnownValue
@@ -34,6 +33,10 @@ fun <T : KnownValue> T.valueToString(): String {
3433
}
3534
}
3635
is StringValue -> {
36+
if (value.contains("\"\"\"")) {
37+
val newValue = value.replace("\"", "\\\"")
38+
return "'$newValue'"
39+
}
3740
return "'$value'"
3841
}
3942
else -> return toString()

0 commit comments

Comments
 (0)