Skip to content

Conversation

@jricardo27
Copy link

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

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