Skip to content

Commit

Permalink
Improved list comparison assert.
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpojer committed Jul 9, 2024
1 parent 3bdb38c commit f7d8c68
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_filename_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ def getenv_mock(key, default=''):
assert expected_report == output_values['report-path']

if report_format == 'csv' and violations:
csv_writer_mock.writerows.assert_called_once_with(violations)
called_args = csv_writer_mock.writerows.call_args[0][0]
expected_items = [violation for violation in violations]
for item in expected_items:
assert item in called_args

if expected_failed_message:
assert expected_failed_message == failed_message
Expand Down

0 comments on commit f7d8c68

Please sign in to comment.