Skip to content

Python codegen improvement: timeouted tests and exceptions #2101

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 7 commits into from
Apr 11, 2023

Conversation

tamarinvs19
Copy link
Collaborator

Description

How to test

Manual tests

Timeouted tests

  1. Generate tests for the long function, e.g.
import time
def f(x):
    time.sleep(2000)
  1. Expected: test with skipping decorator
    • for unittest: @unittest.skip(reason='Disabled due to the fact that the execution is longer then 1000 ms')
    • for pytest: @pytest.skip(reason='Disabled due to the fact that the execution is longer then 1000 ms')

Exception asserts

See #2098

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 ctg-enhancement New feature, improvement or change request comp-codegen Issue is related to code generator lang-python Issue is related to python support labels Apr 5, 2023
@tamarinvs19 tamarinvs19 requested a review from tochilinak April 5, 2023 09:33
@tamarinvs19 tamarinvs19 self-assigned this Apr 5, 2023
Copy link
Member

@tochilinak tochilinak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a small issue about one error message, everything else is fine.

@tamarinvs19 tamarinvs19 merged commit e6e39d3 into main Apr 11, 2023
@tamarinvs19 tamarinvs19 deleted the tamarinvs19/python-codegen-improvement branch April 11, 2023 21:46
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 ctg-enhancement New feature, improvement or change request lang-python Issue is related to python support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use setting Tests with exception for Python Python: generate tests for timeouted functions
2 participants