Skip to content

Implemented support for @keyword decorator #37

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 1 commit into from
Jan 13, 2017

Conversation

EddyPronk
Copy link
Contributor

get_keyword_names populates the mapping from an 'embedded
argument name' to a 'function name'. Assumed is that
get_keyword_names is always called before run_keyword.

Tags passed to the decorator are added at the end of the keyword
documentation using Tags: tag1, tag2 syntax.

The test does not check if tag1 and tag2 have been added to the
keyword yet.

issue: #35

get_keyword_names populates the mapping from an 'embedded
argument name' to a 'function name'. Assumed is that
get_keyword_names is always called before run_keyword.

Tags passed to the decorator are added at the end of the keyword
documentation using Tags: tag1, tag2 syntax.

The test does not check if tag1 and tag2 have been added to the
keyword yet.

issue: robotframework#35
Copy link
Member

@pekkaklarck pekkaklarck left a comment

Choose a reason for hiding this comment

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

Thanks for a great PR! There's one severe but easy to fix bug that I'll fix myself. I'll also enhance tests a little and try to figure out how to test tags.

return inspect.getdoc(self._get_keyword(name)) or ''
keyword = self._get_keyword(name)
doc = inspect.getdoc(keyword) or ''
if len(getattr(keyword, 'robot_tags')):
Copy link
Member

Choose a reason for hiding this comment

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

This causes AttributeError if keyword doesn't have robot_tags. I'll fix it myself along with few other minor changes and test enhancements.

@pekkaklarck pekkaklarck merged commit b430137 into robotframework:master Jan 13, 2017
pekkaklarck added a commit that referenced this pull request Jan 13, 2017
- Dont' require keywords to always have `robot_tags`.
- Minor cleanup elsewhere in code.
- Test enhancements. Tags not really tested yet.
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