Raise an error if SymPyDeprecationWarnings are raised in the tests

This is a continuation of https://github.com/sympy/sympy/pull/793.