Skip to content
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

FIX: Function handler to return False #4706

Merged
merged 5 commits into from
May 23, 2024
Merged

Conversation

SMoraisAnsys
Copy link
Collaborator

@SMoraisAnsys SMoraisAnsys commented May 21, 2024

Following #4463, it seems that the pyaedt_function_handler function was not working correctly. Indeed, if an exception was raised and the settings were such that one would want the function handler to return False, no value was returned by the function (leading to a None return).

Some tests have been added to ensure that the behavior of the function does not changes without notice. They cover the following behaviors of the function handler:

  • enable error handler;
  • release on exception;
  • argument deprecation mechanism.

Closes #4707

Following my request changes in #4463, it seems that the
pyaedt_function_handler function was not working correctly.
Indeed, if an exception was raised and the settings were such
that one would want the function handler to return False,
no value was returned by the function (leading to a None return).
Different behaviors of the function handler are tests:
- enable error handler
- release on exception
- argument deprecation mechanism
@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

@github-actions github-actions bot added the bug Something isn't working label May 21, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 21, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 80.49%. Comparing base (fa00714) to head (7514dcb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4706   +/-   ##
=======================================
  Coverage   80.48%   80.49%           
=======================================
  Files         122      122           
  Lines       54964    54964           
=======================================
+ Hits        44240    44242    +2     
+ Misses      10724    10722    -2     

_unittest/test_utils.py Outdated Show resolved Hide resolved
_unittest/test_utils.py Outdated Show resolved Hide resolved
_unittest/test_utils.py Outdated Show resolved Hide resolved
@SMoraisAnsys SMoraisAnsys merged commit 9f98e0e into main May 23, 2024
33 checks passed
@SMoraisAnsys SMoraisAnsys deleted the fix/function-handler branch May 23, 2024 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug located in pyaedt_function_handler
5 participants