diff --git a/tests/test_equil.py b/tests/test_equil.py index 698d3c9a4..da26fb15f 100644 --- a/tests/test_equil.py +++ b/tests/test_equil.py @@ -475,8 +475,10 @@ def test_ntequl(): df = equil.df(deckstr, ntequl=1) # We are not able to catch this situation.. assert len(df) == 1 - # But this will fail: - with pytest.raises(ValueError): + # But this will fail. Which exception is raised depends + # on the pybind11 version opm is built with which opm + # version is being used. Both are possible. + with pytest.raises((ValueError, RuntimeError)): equil.df(deckstr, ntequl=3) deckstr = """