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
to open expected outpout file with an encoding parameter #717
to open expected outpout file with an encoding parameter #717
Conversation
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@adityapande-1995 could we have another review? |
…x-file-with-unicode-escape
@@ -64,7 +65,7 @@ def _filter(output): | |||
return _filter | |||
|
|||
|
|||
def expected_output_from_file(path): | |||
def expected_output_from_file(path, encoding: Optional[str] = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we are adding in new type annotations, can we add one to path as well?
def expected_output_from_file(path, encoding: Optional[str] = None): | |
def expected_output_from_file(path: str, encoding: Optional[str] = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Updated in e445d13
Co-authored-by: Chris Lalancette <clalancette@gmail.com> Signed-off-by: Chen Lihui <lihui.chen@sony.com>
…x-file-with-unicode-escape
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me with green CI.
CI with repos: |
…x-file-with-unicode-escape
* add an option to read the regex file by escape mode Signed-off-by: Chen Lihui <lihui.chen@sony.com> Co-authored-by: Chris Lalancette <clalancette@gmail.com>
I need to add a test in ros2/rcutils#426, but it does not work if a regex file contains some escape character. (e.g. "\b")