xmitgcm
xmitgcm copied to clipboard
pytest deprecation error
Tests are failing on python 3.6 with a pytest deprectation problem, involving the use of the message keyword
pytest.PytestDeprecationWarning: The 'message' parameter is deprecated.
(did you mean to use `match='some regex'` to check the exception message?)
Please see: https://docs.pytest.org/en/4.6-maintenance/deprecations.html#message-parameter-of-pytest-raises
It should be an easy fix. From pytest docs:
For example:
with pytest.raises(TimeoutError, message="Client got unexpected message"):
wait_for(websocket.recv(), 0.5)
Becomes:
with pytest.raises(TimeoutError):
wait_for(websocket.recv(), 0.5)
pytest.fail("Client got unexpected message")