Extend step decorator#94
Open
jricardo27 wants to merge 2 commits intoaloetesting:masterfrom
jricardo27:extend_step_decorator
Open
Extend step decorator#94jricardo27 wants to merge 2 commits intoaloetesting:masterfrom jricardo27:extend_step_decorator
jricardo27 wants to merge 2 commits intoaloetesting:masterfrom
jricardo27:extend_step_decorator
Conversation
Defines commonly used regexes and allows to easily register two different steps to capture single or double quoted strings. It also allows to register more placeholders to be replaced.
| def step(): # pylint:disable=missing-docstring | ||
| pass | ||
|
|
||
| steps = STEP_REGISTRY |
Member
There was a problem hiding this comment.
Why not the same way as all the other tests?
Member
|
| def __init__(self): | ||
| self.single_expression_placeholders = { | ||
| 'NUMBER': r'(-?\d+(?:\.\d*)?)', | ||
| 'NON_CAPTURING_STRING': r'|'.join((r'"[^"]*"', r"'[^']*'")), |
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.
Defines commonly used regexes for strings and numbers.
When using the string placeholder, the decorator creates two different steps to catch single and double quoted strings.
It also allows to register more placeholders to be replaced.