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

Fixes #1556, by ignoring starting Gherkin keywords. #1600

Merged
merged 2 commits into from
Feb 20, 2016

Conversation

HelioGuilherme66
Copy link
Member

There is a known bug. This is the comment in code:
-# When we change non-gherkin to gherkin, the keyword changes too.
-# The workaround is not to Rename keyword, but only edit field.

@@ -279,12 +280,35 @@ class NullObserver(object):
class RenameKeywordOccurrences(_ReversibleCommand):

def __init__(self, original_name, new_name, observer, keyword_info=None):
self._original_name = original_name
self._new_name = new_name
keyword_name, new_keyword_name = self._check_gherkin(new_name,
Copy link
Member

Choose a reason for hiding this comment

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

These local variables are redundant. You can do self._original_name, self._new_name = self._check_gherkin(...)

@yanne
Copy link
Member

yanne commented Feb 18, 2016

I made some line notes. Also, would there be a way to write unit tests for this, since this is a bit a complex logic?

There is a known bug. This is the comment in code:
-# When we change non-gherkin to gherkin, the keyword changes too.
-# The workaround is not to Rename keyword, but only edit field.
Better code after Janne's review.
Corrected _get_gherkin() name.
@HelioGuilherme66
Copy link
Member Author

Please see if you agree with changes. Thanks.

@yanne
Copy link
Member

yanne commented Feb 20, 2016

I think this looks good.

yanne added a commit that referenced this pull request Feb 20, 2016
Fixes #1556, by ignoring starting Gherkin keywords.
@yanne yanne merged commit d2c77e9 into robotframework:master Feb 20, 2016
@HelioGuilherme66 HelioGuilherme66 deleted the rename_gerkin_#1556 branch February 24, 2016 19:49
@HelioGuilherme66 HelioGuilherme66 added this to the 1.7.3 milestone Jan 18, 2019
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