Description
In case function under test uses NumPy function Utbot throws exception and does not generate tests.
To Reproduce
Steps to reproduce the behavior:
import numpy as np
def calc():
X = np.linspace(start=0, stop=75, num=75, endpoint=True, retstep=False)
- Create Python project with code shown above
- Import NumPy if needed
- Invoke test generation for
calc function
Expected behavior
Tests are supposed to be generated.
Actual behavior
No tests are generated, instead exception is thrown.
Even more when test generation invoked again, there is no even exception notification.
Visual proofs (screenshots, logs, images)
java.lang.IllegalStateException: Something went wrong in initial mypy run.
Python stderr
Mypy stderr: C:\Users\T00814~1\AppData\Local\Temp\UTBot\python-test-generation-04933374978502075636\config.ini: [mypy]: Unrecognized option: implicit_optional = True
at org.utbot.python.newtyping.mypy.RunMypyKt.readMypyAnnotationStorageAndInitialErrors(RunMypy.kt:50)
at org.utbot.python.PythonTestGenerationProcessor.processTestGeneration(PythonTestGenerationProcessor.kt:82)
at org.utbot.python.PythonTestGenerationProcessor.processTestGeneration$default(PythonTestGenerationProcessor.kt:32)
at org.utbot.intellij.plugin.language.python.PythonDialogProcessor$createTests$1.run(PythonDialogProcessor.kt:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:442)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:493)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
Description
In case function under test uses NumPy function Utbot throws exception and does not generate tests.
To Reproduce
Steps to reproduce the behavior:
calcfunctionExpected behavior
Tests are supposed to be generated.
Actual behavior
No tests are generated, instead exception is thrown.
Even more when test generation invoked again, there is no even exception notification.
Visual proofs (screenshots, logs, images)