Implemented support for @keyword decorator - #37
Merged
Conversation
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
approved these changes
Jan 13, 2017
pekkaklarck
left a comment
Member
There was a problem hiding this comment.
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')): |
Member
There was a problem hiding this comment.
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
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.
pekkaklarck
added a commit
that referenced
this pull request
Jan 13, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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