Skip to content

Commit

Permalink
Fix row parsing when there is a # (#411)
Browse files Browse the repository at this point in the history
* Fix row parsing when there is a #

* Update changelog

* Fix whitespace linter error

* Rewrite changelog change
  • Loading branch information
mrverde authored Jan 27, 2025
1 parent 658096f commit dab3273
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ v3.3.1
*Release date: In development*

- Allow to save the diff image in jpg format for visual tests working with jpg
- Fix the use of the # character in the actions defined in the feature description (Actions Before/After...)

v3.3.0
------
Expand Down
6 changes: 3 additions & 3 deletions toolium/behave/env_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ def get_steps_from_feature_description(self, description):
step_text_start = False
for row in description:
if label_exists != EMPTY:
# in case of a line with a comment, it is removed
if "#" in row:
row = row[0:row.find("#")].strip()
# The row is removed if it's a comment
if row.strip().startswith("#"):
row = ""

if any(row.startswith(x) for x in KEYWORDS):
self.actions[label_exists].append(row)
Expand Down

0 comments on commit dab3273

Please sign in to comment.