Repository navigation
Closed
Labels
comp-codegenIssue is related to code generatorIssue is related to code generatorctg-bugIssue is a bugIssue is a buglang-pythonIssue is related to python supportIssue is related to python support
Description
Description
Sometimes MyPy cannot properly guess type of parameters so starting to iterate over improper types till timeout occurs.
To Reproduce
class NoTestsProblem:
def __init__(self):
self.board = []
def set_position(self, row, col, symbol):
self.board[row][col] = symbol
return symbol
def start(self):
self.set_position(1, 2, "O")Steps to reproduce the behavior:
- Add to Python project the code above
- Invoke test generation for
set_positionfunction
Expected behavior
Tests are supposed to be generated.
Actual behavior
No test are generated.
Visual proofs (screenshots, logs, images)
idea.log contains following information:
2023-02-17 16:44:08,416 [6012745] INFO - STDOUT - | UtBot - PythonTestCaseGenerator | Inferred annotations: no_tests_bug.NoTestsProblem, builtins.str, builtins.list[typing.Any], builtins.list[typing.Any]
2023-02-17 16:44:08,418 [6012747] INFO - STDOUT - | UtBot - PythonApi | Provider ReduceValueProvider accepts type no_tests_bug.NoTestsProblem
2023-02-17 16:44:08,419 [6012748] INFO - STDOUT - | UtBot - PythonApi | Provider ListValueProvider accepts type builtins.list[typing.Any]
2023-02-17 16:44:08,419 [6012748] INFO - STDOUT - | UtBot - PythonApi | Provider ConstantValueProvider accepts type builtins.list[typing.Any]
2023-02-17 16:44:08,419 [6012748] INFO - STDOUT - | UtBot - PythonApi | Any does not have provider
202
...
....
2023-02-17 16:44:29,690 [6034019] INFO - STDOUT - | UtBot - PythonEngine | Evaluation with prohibited exception. Substituted types: no_tests_bug.NoTestsProblem, builtins.str, builtins.list[typing.Any], builtins.list[typing.Any]. Exception type: builtins.TypeError
2023-02-17 16:44:29,931 [6034260] INFO - STDOUT - | UtBot - PythonEngine | Evaluation with prohibited exception. Substituted types: no_tests_bug.NoTestsProblem, builtins.str, builtins.list[typing.Any], builtins.list[typing.Any]. Exception type: builtins.TypeError
2023-02-17 16:44:30,154 [6034483] INFO - STDOUT - | UtBot - PythonEngine | Evaluation with prohibited exception. Substituted types: no_tests_bug.NoTestsProblem, builtins.str, builtins.list[typing.Any], builtins.list[typing.Any]. Exception type: builtins.TypeError
2023-02-17 16:44:30,374 [6034703] INFO - STDOUT - | UtBot - PythonEngine | Evaluation with prohibited exception. Substituted types: no_tests_bug.NoTestsProblem, builtins.str, builtins.list[typing.Any], builtins.list[typing.Any]. Exception type: builtins.TypeError
Metadata
Metadata
Assignees
Labels
comp-codegenIssue is related to code generatorIssue is related to code generatorctg-bugIssue is a bugIssue is a buglang-pythonIssue is related to python supportIssue is related to python support
Type
Projects
- StatusShow more project fieldsDone
Activity
tamarinvs19 commentedon Feb 22, 2023
Already fixed in #1817