test_deprecations.py 616 B

123456789101112131415161718192021
  1. """Test deprecation and future warnings.
  2. """
  3. import pytest
  4. import numpy as np
  5. def test_qr_mode_full_future_warning():
  6. """Check mode='full' FutureWarning.
  7. In numpy 1.8 the mode options 'full' and 'economic' in linalg.qr were
  8. deprecated. The release date will probably be sometime in the summer
  9. of 2013.
  10. """
  11. a = np.eye(2)
  12. pytest.warns(DeprecationWarning, np.linalg.qr, a, mode='full')
  13. pytest.warns(DeprecationWarning, np.linalg.qr, a, mode='f')
  14. pytest.warns(DeprecationWarning, np.linalg.qr, a, mode='economic')
  15. pytest.warns(DeprecationWarning, np.linalg.qr, a, mode='e')