Test that DeprecationWarnings are raised when using the `msg` kwarg