From f5f512eb912cb05e4eaf7daa331df15c41e2adf3 Mon Sep 17 00:00:00 2001 From: Michael Deceglie Date: Wed, 1 Nov 2023 11:42:11 -0600 Subject: [PATCH] update interpolate_test.py to check for specific warning message --- rdtools/test/interpolate_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdtools/test/interpolate_test.py b/rdtools/test/interpolate_test.py index 1cac37b9e..448d3ed39 100644 --- a/rdtools/test/interpolate_test.py +++ b/rdtools/test/interpolate_test.py @@ -135,6 +135,6 @@ def test_interpolate_warning(test_df, df_target_index, df_expected_result): with pytest.warns(None) as record: interpolate(test_df, df_target_index, pd.to_timedelta('15 minutes'), warning_threshold=0.5) - if record: + if 'Fraction of excluded data' in ';'.join([str(x.message) for x in record.list]): pytest.fail("normalize.interpolate raised a warning about " "excluded data even though the threshold was high")