test_exceptions.py 716 B

123456789101112
  1. from sympy.testing.pytest import raises
  2. from sympy.utilities.exceptions import sympy_deprecation_warning
  3. # Only test exceptions here because the other cases are tested in the
  4. # warns_deprecated_sympy tests
  5. def test_sympy_deprecation_warning():
  6. raises(TypeError, lambda: sympy_deprecation_warning('test',
  7. deprecated_since_version=1.10,
  8. active_deprecations_target='active-deprecations'))
  9. raises(ValueError, lambda: sympy_deprecation_warning('test',
  10. deprecated_since_version="1.10", active_deprecations_target='(active-deprecations)='))