Skip to content

Commit

Permalink
Use sampled_from instead of parametrize in test
Browse files Browse the repository at this point in the history
This is in order to speed up the test by sampling 100 times
insted of 25*100 times.
  • Loading branch information
eivindjahren committed Dec 5, 2024
1 parent 0a3f7e1 commit a144f88
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/ert/unit_tests/config/test_read_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,12 @@ def test_group_and_well_have_named_format(keyword, number, name, nx, ny):
assert make_summary_key(keyword, number, name, nx, ny) == f"{keyword}:{name}"


@given(st.text(), st.integers(), st.integers())
@pytest.mark.parametrize("keyword", inter_region_summary_variables)
@given(
st.sampled_from(inter_region_summary_variables),
st.text(),
st.integers(),
st.integers(),
)
def test_inter_region_summary_format_contains_in_and_out_regions(keyword, name, nx, ny):
number = 3014660
assert make_summary_key(keyword, number, name, nx, ny) == f"{keyword}:4-82"
Expand Down

0 comments on commit a144f88

Please sign in to comment.