Skip to content

Commit 7cbfc47

Browse files
committed
Revert string literals to their original form
1 parent fee0eb9 commit 7cbfc47

File tree

3 files changed

+26
-36
lines changed

3 files changed

+26
-36
lines changed

tests/feature/test_background.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
import textwrap
44

5-
FEATURE = """\
5+
FEATURE = '''\
66
Feature: Background support
77
88
Background:
99
Given foo has a value "bar"
1010
And a background step with multiple lines:
11-
\"\"\"
11+
"""
1212
one
1313
two
14-
\"\"\"
14+
"""
1515
1616
1717
Scenario: Basic usage
@@ -23,7 +23,7 @@
2323
2424
Then foo should have value "dummy"
2525
And foo should not have value "bar"
26-
"""
26+
'''
2727

2828
STEPS = r"""\
2929
import re

tests/feature/test_description.py

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,39 +30,29 @@ def test_description(pytester):
3030

3131
pytester.makepyfile(
3232
textwrap.dedent(
33-
"""\
34-
import textwrap
35-
from pytest_bdd import given, scenario
36-
37-
@scenario("description.feature", "Description")
38-
def test_description():
39-
pass
33+
r'''
34+
import textwrap
35+
from pytest_bdd import given, scenario
4036
37+
@scenario("description.feature", "Description")
38+
def test_description():
39+
pass
4140
42-
@given("I have a bar")
43-
def _():
44-
return "bar"
4541
46-
def test_feature_description():
47-
assert test_description.__scenario__.feature.description == textwrap.dedent(
48-
\"\"\"\\
49-
In order to achieve something
50-
I want something
51-
Because it will be cool
42+
@given("I have a bar")
43+
def _():
44+
return "bar"
5245
46+
def test_feature_description():
47+
assert test_description.__scenario__.feature.description == textwrap.dedent(
48+
"In order to achieve something\nI want something\nBecause it will be cool\n\n\nSome description goes here."
49+
)
5350
54-
Some description goes here.\"\"\"
55-
)
56-
57-
def test_scenario_description():
58-
assert test_description.__scenario__.description == textwrap.dedent(
59-
\"\"\"\\
60-
Also, the scenario can have a description.
61-
62-
It goes here between the scenario name
63-
and the first step.\"\"\"
64-
)
65-
"""
51+
def test_scenario_description():
52+
assert test_description.__scenario__.description == textwrap.dedent(
53+
"Also, the scenario can have a description.\n\nIt goes here between the scenario name\nand the first step."""
54+
)
55+
'''
6656
)
6757
)
6858

tests/feature/test_multiline.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
[
1111
(
1212
textwrap.dedent(
13-
"""\
13+
'''\
1414
Feature: Multiline
1515
Scenario: Multiline step using sub indentation
1616
Given I have a step with:
17-
\"\"\"
17+
"""
1818
Some
1919
2020
Extra
2121
Lines
22-
\"\"\"
22+
"""
2323
Then the text should be parsed with correct indentation
24-
"""
24+
'''
2525
),
2626
"Some\n\nExtra\nLines",
2727
)

0 commit comments

Comments
 (0)