Skip to content

Commit

Permalink
Mute possible warnings when randomly generating config files
Browse files Browse the repository at this point in the history
We can't say upfront of the randomly generated config files will trigger
ConfigWarning, so mute all instead of doing pytest.warns.
  • Loading branch information
berland committed Aug 26, 2024
1 parent 51e58b9 commit 802c897
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unit_tests/config/test_ert_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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())
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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"]
)
Expand Down

0 comments on commit 802c897

Please sign in to comment.