Closed
Description
Description
Even when all types are specified UTBot Python doesn't find case when Division by Zero happens. Both UTBotJava and UTBotCPP can find such problem and it seems quite classic example of the problem which could be revealed with static analysis, so I would expect that UTBot Python also find the error.
To Reproduce
Steps to reproduce the behavior:
def div(a: int, b: int) -> int:
return a / b
- Invoke code generation on code above
Expected behavior
Test which exposes 'Division by Zero' problem is generated among the others.
Actual behavior
No such test is generated, the only test looks like that:
def test_div(self):
"""
a = 4
b = 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
"""
actual = basics.div(4, 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111)
self.assertEqual(0.0, actual)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done