Skip to content

Implemented support for @keyword decorator - #37

Merged
pekkaklarck merged 1 commit into
robotframework:masterfrom
EddyPronk:keyword-decorator
Jan 13, 2017
Merged

Implemented support for @keyword decorator#37
pekkaklarck merged 1 commit into
robotframework:masterfrom
EddyPronk:keyword-decorator

Conversation

@EddyPronk

Copy link
Copy Markdown
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

@pekkaklarck pekkaklarck left a comment

Copy link
Copy Markdown
Member

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.

Comment thread src/robotremoteserver.py
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
Copy Markdown
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