Skip to content

Extend step decorator#94

Open
jricardo27 wants to merge 2 commits intoaloetesting:masterfrom
jricardo27:extend_step_decorator
Open

Extend step decorator#94
jricardo27 wants to merge 2 commits intoaloetesting:masterfrom
jricardo27:extend_step_decorator

Conversation

@jricardo27
Copy link
Copy Markdown

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.

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
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.

Why not the same way as all the other tests?

@koterpillar
Copy link
Copy Markdown
Member

def __init__(self):
self.single_expression_placeholders = {
'NUMBER': r'(-?\d+(?:\.\d*)?)',
'NON_CAPTURING_STRING': r'|'.join((r'"[^"]*"', r"'[^']*'")),
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.

What are these two for?

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