From faf1e5ee9f5992f50f802cdd8d15eab3a1ec1547 Mon Sep 17 00:00:00 2001 From: Nitin Madnani Date: Sun, 2 Aug 2020 13:32:42 -0400 Subject: [PATCH] skip checking deprecation warnings in all reports. --- rsmtool/test_utils.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/rsmtool/test_utils.py b/rsmtool/test_utils.py index da88a3f6a..8faf675f7 100644 --- a/rsmtool/test_utils.py +++ b/rsmtool/test_utils.py @@ -209,7 +209,13 @@ def check_run_evaluation(source, if consistency: check_consistency_files_exist(output_files, experiment_id) - check_report(html_report) + check_report(html_report, raise_warnings=False) + + # we want to ignore deprecation warnings for RSMEval, so we remove + # them from the list; then, we make sure that there are no other warnings + warning_msgs = collect_warning_messages_from_report(html_report) + warning_msgs = [msg for msg in warning_msgs if 'DeprecationWarning' not in msg] + assert_equal(len(warning_msgs), 0) def check_run_comparison(source, @@ -384,7 +390,13 @@ def check_run_summary(source, if exists(expected_output_file): check_file_output(output_file, expected_output_file) - check_report(html_report) + check_report(html_report, raise_warnings=False) + + # we want to ignore deprecation warnings for RSMSummarize, so we remove + # them from the list; then, we make sure that there are no other warnings + warning_msgs = collect_warning_messages_from_report(html_report) + warning_msgs = [msg for msg in warning_msgs if 'DeprecationWarning' not in msg] + assert_equal(len(warning_msgs), 0) def do_run_experiment(source,