test_deprecation.py 440 B

12345678910
  1. import pytest
  2. @pytest.mark.thread_unsafe(reason="deprecate_cython_api is not thread-safe")
  3. def test_cython_api_deprecation():
  4. match = ("`scipy._lib._test_deprecation_def.foo_deprecated` "
  5. "is deprecated, use `foo` instead!\n"
  6. "Deprecated in Scipy 42.0.0")
  7. with pytest.warns(DeprecationWarning, match=match):
  8. from .. import _test_deprecation_call
  9. assert _test_deprecation_call.call() == (1, 1)