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

Provide internal unfind method to emulate inverse find #64

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

pevogam
Copy link
Member

@pevogam pevogam commented Dec 13, 2024

This method is needed to separate internal method calls within the region class since certain public methods like wait and the previously unfind emulating wait_vanish could be overridden while find and the resulting _unfind are typically not to preserve behaviors from all internal calls by other public region methods.

For instance to better illustrate this - consider a case where we would like to catch FindError and NotFindError exceptions and convert them to test failures or other specialized exceptions. If one overrides wait and wait_vanish then click_vanish or e.g. press_expect will not catch the right exception types and guibot will not retry its human-like UI control attempts.

This method is needed to separate internal method calls within the
region class since certain public methods like `wait` and the
previously unfind emulating `wait_vanish` could be overridden while
`find` and the resulting `_unfind` are typically not to preserve
behaviors from all internal calls by other public region methods.

For instance to better illustrate this - consider a case where we
would like to catch `FindError` and `NotFindError` exceptions and
convert them to test failures or other specialized exceptions. If
one overrides `wait` and `wait_vanish` then `click_vanish` or e.g.
`press_expect` will not catch the right exception types and guibot
will not retry its human-like UI control attempts.
@pevogam pevogam self-assigned this Dec 13, 2024
@pevogam pevogam added the bug Something isn't working label Dec 13, 2024
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.10%. Comparing base (05b6b60) to head (1be0df5).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #64   +/-   ##
=======================================
  Coverage   85.09%   85.10%           
=======================================
  Files          17       17           
  Lines        4637     4639    +2     
=======================================
+ Hits         3946     3948    +2     
  Misses        691      691           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pevogam pevogam merged commit d3b5b43 into intra2net:master Dec 16, 2024
10 checks passed
@pevogam pevogam deleted the unfind-internals branch December 16, 2024 13:14
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.

1 participant