forked from test_framework/pytest-bdd
Always use clean line for description
This commit is contained in:
parent
ce87c51380
commit
eff9bfa566
|
@ -147,7 +147,7 @@ def parse_feature(basedir: str, filename: str, encoding: str = "utf-8") -> Featu
|
||||||
elif prev_mode == types.FEATURE:
|
elif prev_mode == types.FEATURE:
|
||||||
# Do not include comments in descriptions
|
# Do not include comments in descriptions
|
||||||
if not stripped_line.startswith("#"):
|
if not stripped_line.startswith("#"):
|
||||||
description.append(line)
|
description.append(clean_line)
|
||||||
else:
|
else:
|
||||||
raise exceptions.FeatureError(
|
raise exceptions.FeatureError(
|
||||||
"Multiple features are not allowed in a single feature file",
|
"Multiple features are not allowed in a single feature file",
|
||||||
|
@ -169,7 +169,7 @@ def parse_feature(basedir: str, filename: str, encoding: str = "utf-8") -> Featu
|
||||||
# Do not include comments in descriptions
|
# Do not include comments in descriptions
|
||||||
if stripped_line.startswith("#"):
|
if stripped_line.startswith("#"):
|
||||||
continue
|
continue
|
||||||
scenario.add_description_line(line)
|
scenario.add_description_line(clean_line)
|
||||||
continue
|
continue
|
||||||
tags = get_tags(prev_line)
|
tags = get_tags(prev_line)
|
||||||
scenario = ScenarioTemplate(
|
scenario = ScenarioTemplate(
|
||||||
|
|
|
@ -19,7 +19,6 @@ def test_description(pytester):
|
||||||
Some description goes here.
|
Some description goes here.
|
||||||
|
|
||||||
Scenario: Description
|
Scenario: Description
|
||||||
|
|
||||||
Also, the scenario can have a description.
|
Also, the scenario can have a description.
|
||||||
|
|
||||||
It goes here between the scenario name
|
It goes here between the scenario name
|
||||||
|
|
Loading…
Reference in New Issue