Skip to content

Commit 8df4fdb

Browse files
Copilotzkoppert
andcommitted
Improve test robustness based on code review feedback
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
1 parent 7b78ee3 commit 8df4fdb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test_measure_innersource.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def test_main_missing_user_in_org_chart(tmp_path, monkeypatch, caplog):
144144
# Verify that the function returned early (didn't process further)
145145
# by checking that subsequent info logs were not called
146146
info_calls = [call[0][0] for call in
147-
mock_logger.info.call_args_list]
147+
mock_logger.info.call_args_list if call[0]]
148148

149149
# Should have logged about reading org data and analyzing first
150150
# commit, but should NOT have logged about original commit author
@@ -154,5 +154,6 @@ def test_main_missing_user_in_org_chart(tmp_path, monkeypatch, caplog):
154154

155155
# Should NOT contain the log message about
156156
# "Original commit author: X, with manager: Y"
157-
assert not any("Original commit author:" in msg and
158-
"with manager:" in msg for msg in info_calls)
157+
assert not any(isinstance(msg, str) and "Original commit author:"
158+
in msg and "with manager:" in msg for msg in
159+
info_calls)

0 commit comments

Comments
 (0)