Skip to content

Commit 84aa72a

Browse files
authored
Simplify check
1 parent 73b8b20 commit 84aa72a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/pytest_bdd/parser.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,8 @@ def parse_feature(basedir: str, filename: str, encoding: str = "utf-8") -> Featu
167167
# are considered part of the scenario description.
168168
if scenario and not keyword:
169169
# Do not include comments in descriptions
170-
if stripped_line.startswith("#"):
171-
continue
172-
scenario.add_description_line(clean_line)
170+
if not stripped_line.startswith("#"):
171+
scenario.add_description_line(clean_line)
173172
continue
174173
tags = get_tags(prev_line)
175174
scenario = ScenarioTemplate(

0 commit comments

Comments
 (0)