Skip to content

Commit

Permalink
Fix remove ALL reporting for WUKS, add test
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Dec 27, 2024
1 parent 990bf4a commit bb1a743
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
5 changes: 4 additions & 1 deletion robotframework_reportportal/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ def _log_message(self, message: LogMessage) -> None:
current_item = self.current_item
if current_item and not getattr(current_item, "posted", True) and message.level not in ["ERROR", "WARN"]:
self.current_item.skipped_logs.append(message)
elif getattr(current_item, "matched_filter", None) is not WKUS_KEYWORD_MATCH:
elif (
getattr(current_item, "matched_filter", None) is not WKUS_KEYWORD_MATCH
and not self._remove_keyword_content
):
# Post everything skipped by '--removekeywords' option
self._post_skipped_keywords(current_item)
self.__post_log_message(message)
Expand Down
18 changes: 18 additions & 0 deletions tests/integration/test_remove_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,24 @@
0,
"Content removed using the --remove-keywords option.",
),
(
"examples/wuks_keyword.robot",
"ALL",
0,
["PASSED"] * 3,
1,
0,
"Content removed using the --remove-keywords option.",
),
(
"examples/wuks_keyword_failed.robot",
"ALL",
1,
["FAILED"] * 3,
1,
0,
"Content removed using the --remove-keywords option.",
),
],
)
@mock.patch(REPORT_PORTAL_SERVICE)
Expand Down

0 comments on commit bb1a743

Please sign in to comment.