File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
utbot-python/src/main/kotlin/org/utbot/python/fuzzing/provider Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -17,15 +17,16 @@ class ReduceValueProvider(
17
17
private val idGenerator : IdGenerator <Long >
18
18
) : ValueProvider<Type, PythonTreeModel, PythonMethodDescription> {
19
19
override fun accept (type : Type ): Boolean {
20
- val hasInit = type.getPythonAttributes().any { it.name == " __init__" }
20
+ val hasInit = type.getPythonAttributes().any { it.name == " __init__" && it.type is FunctionTypeCreator . Original }
21
21
return type.meta is PythonConcreteCompositeTypeDescription && hasInit
22
22
}
23
23
24
24
override fun generate (description : PythonMethodDescription , type : Type ) = sequence {
25
25
val meta = type.meta as PythonConcreteCompositeTypeDescription
26
26
val arguments = (type.getPythonAttributes().first { it.name == " __init__" }.type as FunctionTypeCreator .Original ).arguments
27
+ val nonSelfArgs = arguments.drop(1 )
27
28
yield (Seed .Recursive (
28
- construct = Routine .Create (arguments ) { v ->
29
+ construct = Routine .Create (nonSelfArgs ) { v ->
29
30
PythonTreeModel (
30
31
PythonTree .ReduceNode (
31
32
idGenerator.createId(),
You can’t perform that action at this time.
0 commit comments