equinor / xtgeo

XTGeo Python class library for subsurface Surfaces, Cubes, Wells, Grids, Points, etc
https://xtgeo.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
109 stars 56 forks source link

TST: Fix tests broken with pytest 8.0 #1143

Closed mferrera closed 6 months ago

mferrera commented 6 months ago

pytest.warns(None) was deprecated with pytest 8.0. Additionally I think pytest has an error with respect to catch the test_cube_from_file_warns DeprecationWarning and does a wrong instantiation of a DeprecationWarning to catch it. The message specificity was removed because if from_file() is deprecated then by definition so is any additional arguments that method takes.