Description
Description
Python test generation error is showing for quite simple python functions, including examples on utbot.org
To Reproduce
- Install one of the latest plugin builds from main in IntelliJ Idea 2022.2.3
- Install Python plugin from MarketPlace
- Create a Python project
- Add the following code to it:
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
def div(a, b):
return a / b
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
print_hi('PyCharm')
- Press Alt+Shift+U in code
- Select both functions and generate tests
- Agree to install suggested requirements
- Make 5-6 steps once again
Expected behavior
Tests are supposed to be generated.
Actual behavior
An error dialog is show with the following test:
Cannot create tests for the following functions: print_hi, div
Visual proofs (screenshots, logs, images)
Environment
Windows 10 Pro
IntelliJ IDEA 2022.2.3 (not latest)
Additional context
Same with pytest
or increased timeouts or manually create test sources root.
Generating tests...
is displayed in inline progress.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done