Skip to content

Commit

Permalink
Fix remove keywords for PASSED case. Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Dec 27, 2024
1 parent bc47c73 commit 3cbb33b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 2 additions & 4 deletions robotframework_reportportal/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,8 @@ def _log_message(self, message: LogMessage) -> None:
return

if (
not getattr(current_item, "posted", True)
and getattr(current_item, "remove_data", False)
and message.level not in ["ERROR", "WARN"]
):
not getattr(current_item, "posted", True) or getattr(current_item, "remove_data", False)
) 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
Expand Down
9 changes: 9 additions & 0 deletions tests/integration/test_remove_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,15 @@
0,
"Content removed using the --remove-keywords option.",
),
(
"examples/while_keyword.robot",
"PASSED",
0,
["PASSED"] * 4,
2,
1,
"Content removed using the --remove-keywords option.",
),
],
)
@mock.patch(REPORT_PORTAL_SERVICE)
Expand Down

0 comments on commit 3cbb33b

Please sign in to comment.