Skip to content

Cleanup - #884

Merged
aaltat merged 6 commits into
robotframework:masterfrom
pekkaklarck:cleanup
Sep 4, 2017
Merged

aaltat merged 6 commits into
robotframework:masterfrom
pekkaklarck:cleanup

Conversation

@pekkaklarck

Copy link
Copy Markdown
Member
  1. Little import cleanup
  2. Fix registering keyword to run on failure (Return value of Register keyword to run on failure cannot always be used to restore original state #176)
  3. Make public attributes actually public (Externally useful attributes should be declared public and documented. #882)

This PR contains somewhat unrelated fixes, but commits ought to mainly contain only a single fix.

- Merge imports from same module into single import.
- Expose some often used robot.utils via our utils.
1. Return value from `Register keyword to run on failure` can now
   always be used as an argument to the keyword. In practice the
   keyword nowadays returns `None` if the functionality was disabled
   and `None` (as well as `'NONE'`) can be used to disable the
   functionality. Fixes robotframework#176.

2. Moved the hook method to run when a keyword fails to the core.
   This simplifies implementation. The hook method was also
   renamed from `run_on_failure` to `failure_occurred`.
Renamed these:
  _run_on_failure_keyword
  _speed_in_secs
  _timeout_in_secs
  _implicit_wait_in_secs

to these:
  run_on_failure_keyword
  speed
  timeout
  implicit_wait

Original attributes still work but are deprecated. Deprecation isn't
currently tested but unit tests could be added.
@aaltat

aaltat commented Sep 3, 2017

Copy link
Copy Markdown
Contributor

Looks good on mobile screen, need to take closer look from bigger screen. Spotted one thing though.

The line 492 contained not needed q character.
@aaltat
aaltat merged commit fa1fee3 into robotframework:master Sep 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants