UnitTestBot / UTBotJava

Automated unit test generation and precise code analysis for Java
Apache License 2.0
132 stars 40 forks source link

Fix python instructions collecting method for python 3.9 and older #2693

Closed tamarinvs19 closed 10 months ago

tamarinvs19 commented 10 months ago

Description

Used dis.get_instructions() instead of __code__.co_lines() for instruction collecting if python interpreter version is older then 3.10

How to test

Manual tests

  1. Run utbot on python project with python 3.9 (3.8, ...)
  2. Run utbot on python project with python 3.10 (3.11, 3.12)

Self-check list

Check off the item if the statement is true. Hint: [x] is a marked item.

Please do not delete the list or its items.