diff options
author | Allan Haldane <allan.haldane@gmail.com> | 2015-07-18 11:34:11 -0400 |
---|---|---|
committer | Allan Haldane <allan.haldane@gmail.com> | 2015-07-27 18:15:37 -0400 |
commit | ede15881846af7aa6058c89359b9f9190201bfb5 (patch) | |
tree | 748543d7b1b3f3ca78f28b7e9e48aa5d38281d51 /numpy/testing/nosetester.py | |
parent | 9232200cb99323730d5ad23c79a846649b55a345 (diff) | |
download | numpy-ede15881846af7aa6058c89359b9f9190201bfb5.tar.gz |
MAINT: fix raise_warnings in np.test in py3
In python3 np.test would raise an error if raise_warnings is a list
since dict.keys() now returns a dict_keys instance. Eg,
np.test('full', raise_warnings=[FutureWarning])
Diffstat (limited to 'numpy/testing/nosetester.py')
-rw-r--r-- | numpy/testing/nosetester.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py index dfe3b1262..faed0e651 100644 --- a/numpy/testing/nosetester.py +++ b/numpy/testing/nosetester.py @@ -401,7 +401,7 @@ class NoseTester(object): _warn_opts = dict(develop=(DeprecationWarning, RuntimeWarning), release=()) - if raise_warnings in _warn_opts.keys(): + if isinstance(raise_warnings, basestring): raise_warnings = _warn_opts[raise_warnings] with warnings.catch_warnings(): |