diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2020-08-23 18:55:03 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-23 18:55:03 -0600 |
commit | 1af65ee2225a011b39a9cceac306328be3737aa2 (patch) | |
tree | 94bd19333d9ef33bdc559eb195cb51fd32c6398d /numpy/lib | |
parent | 196d633cb19274ddffb4ba42928126fd15e3282d (diff) | |
parent | d10245fff16395cd83344543a59d470d24d7c2fd (diff) | |
download | numpy-1af65ee2225a011b39a9cceac306328be3737aa2.tar.gz |
Merge pull request #17143 from WarrenWeckesser/finfuncs-warn
MAINT: Change handling of the expired financial functions.
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/tests/test_financial_expired.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/numpy/lib/tests/test_financial_expired.py b/numpy/lib/tests/test_financial_expired.py index e1d05da0c..66bb08026 100644 --- a/numpy/lib/tests/test_financial_expired.py +++ b/numpy/lib/tests/test_financial_expired.py @@ -3,10 +3,11 @@ import pytest import numpy as np +@pytest.mark.skipif(sys.version_info[:2] < (3, 7), + reason="requires python 3.7 or higher") def test_financial_expired(): - if sys.version_info[:2] >= (3, 7): - match = 'NEP 32' - else: - match = None - with pytest.raises(AttributeError, match=match): - np.fv + match = 'NEP 32' + with pytest.warns(RuntimeWarning, match=match): + func = np.fv + with pytest.raises(RuntimeError, match=match): + func(1, 2, 3) |