From f7d8c6835ae8f29e9091f1cfae997f74a696eb03 Mon Sep 17 00:00:00 2001 From: miroslavpojer Date: Tue, 9 Jul 2024 13:31:15 +0200 Subject: [PATCH] Improved list comparison assert. --- tests/test_filename_inspector.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_filename_inspector.py b/tests/test_filename_inspector.py index 62f6037..a5058c2 100644 --- a/tests/test_filename_inspector.py +++ b/tests/test_filename_inspector.py @@ -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