From 802c89786640d701549a7381af0562d0b68667b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Berland?= Date: Mon, 26 Aug 2024 14:13:42 +0200 Subject: [PATCH] Mute possible warnings when randomly generating config files We can't say upfront of the randomly generated config files will trigger ConfigWarning, so mute all instead of doing pytest.warns. --- tests/unit_tests/config/test_ert_config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/unit_tests/config/test_ert_config.py b/tests/unit_tests/config/test_ert_config.py index 933ee6c6bf0..a2215f45f38 100644 --- a/tests/unit_tests/config/test_ert_config.py +++ b/tests/unit_tests/config/test_ert_config.py @@ -505,6 +505,7 @@ def test_that_subst_list_is_given_default_runpath_file(): ) +@pytest.mark.filterwarnings("ignore::ert.config.ConfigWarning") @pytest.mark.usefixtures("set_site_config") @settings(max_examples=10) @given(config_generators()) @@ -518,6 +519,7 @@ def test_that_creating_ert_config_from_dict_is_same_as_from_file( ) == ErtConfig.from_file(filename) +@pytest.mark.filterwarnings("ignore::ert.config.ConfigWarning") @pytest.mark.usefixtures("set_site_config") @settings(max_examples=10) @given(config_generators()) @@ -611,6 +613,7 @@ def test_queue_config_max_running_invalid_values(max_running_value, expected_err ErtConfig.from_file(test_config_file_name) +@pytest.mark.filterwarnings("ignore::ert.config.ConfigWarning") @pytest.mark.usefixtures("use_tmpdir") @given(st.integers(min_value=0), st.integers(min_value=0), st.integers(min_value=0)) def test_num_cpu_vs_torque_queue_cpu_configuration( @@ -1617,6 +1620,7 @@ def test_using_relative_path_to_eclbase_sets_jobname_to_basename(tmp_path): ) +@pytest.mark.filterwarnings("ignore::ert.config.ConfigWarning") @pytest.mark.parametrize( "param_config", ["coeffs_priors", "template.txt output.txt coeffs_priors"] )