Skip to content

Python small fixes #2250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 2, 2023
Merged

Python small fixes #2250

merged 6 commits into from
Jun 2, 2023

Conversation

tamarinvs19
Copy link
Collaborator

Description

A few small fixes in UTBot Python:

  1. fixed empty and one-element tuple code generation
  2. fixed missing imports for constructors
  3. fixed disconnecting socket for coverage
  4. fixed wrong strings with \ at the end
  5. fixed serialisation of Infinity from fuzzer
  6. fixed serialisation of state field in reduce object
  7. fixed focused item in dialog window

How to test

Manual tests

  1. generate tests for function which returns empty or one-element tuple, expected: no syntax error
def f(x): return tuple()
def g(x): return (x,)
  1. generate tests for utbot-python/samples/samples/using_collections.py, expected: no syntax error
  2. no stop generation after some exception in execution
  3. no message about in in logs
  4. Infinity from fuzzer serialised to float('inf')
  5. no problem with serialisation of composite objects
  6. try to generate tests for one function from the file with other functions or for one method from the class with other methods, expected: only tested function / method is selected in dialog window.

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.

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@tamarinvs19 tamarinvs19 added comp-codegen Issue is related to code generator comp-ui Improvements of plugin UI appearence and functionality lang-python Issue is related to python support ctg-bug-fix PR is fixing a bug labels Jun 1, 2023
@tamarinvs19 tamarinvs19 self-assigned this Jun 1, 2023
@tamarinvs19 tamarinvs19 requested a review from tochilinak June 1, 2023 11:39
@tamarinvs19 tamarinvs19 merged commit 9777393 into main Jun 2, 2023
@tamarinvs19 tamarinvs19 deleted the tamarinvs19/python-fixes branch June 2, 2023 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-codegen Issue is related to code generator comp-ui Improvements of plugin UI appearence and functionality ctg-bug-fix PR is fixing a bug lang-python Issue is related to python support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants