Skip to content

Commit ce63d93

Browse files
committed
Fix invalid escape sequences
1 parent da20c46 commit ce63d93

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

pytest_bdd/feature.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
("But ", None),
5858
]
5959

60-
STEP_PARAM_RE = re.compile("\<(.+?)\>")
61-
COMMENT_RE = re.compile('(^|(?<=\s))#')
60+
STEP_PARAM_RE = re.compile(r"\<(.+?)\>")
61+
COMMENT_RE = re.compile(r'(^|(?<=\s))#')
6262

6363

6464
def get_step_type(line):

pytest_bdd/scenario.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def execfile(filename, init_globals):
5050
init_globals.update(result)
5151

5252

53-
PYTHON_REPLACE_REGEX = re.compile("\W")
54-
ALPHA_REGEX = re.compile("^\d+_*")
53+
PYTHON_REPLACE_REGEX = re.compile(r"\W")
54+
ALPHA_REGEX = re.compile(r"^\d+_*")
5555

5656

5757
def find_argumented_step_fixture_name(name, type_, fixturemanager, request=None):

tests/feature/test_outline.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ def wrongly_outlined():
4949
pass
5050

5151
assert re.match(
52-
"""Scenario \"Outlined with wrong examples\" in the feature \"(.+)\" has not valid examples\. """
53-
"""Set of step parameters (.+) should match set of example values """
54-
"""(.+)\.""",
52+
r"""Scenario \"Outlined with wrong examples\" in the feature \"(.+)\" has not valid examples\. """
53+
r"""Set of step parameters (.+) should match set of example values """
54+
r"""(.+)\.""",
5555
exc.value.args[0]
5656
)
5757

tests/steps/test_unicode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_steps_in_py_file_have_unicode():
2424
pass
2525

2626

27-
pattern = '(?P<content>\'\w+\')'
27+
pattern = r"(?P<content>'\w+')"
2828

2929

3030
@pytest.fixture

0 commit comments

Comments
 (0)