summaryrefslogtreecommitdiff
path: root/numpy/testing/utils.py
diff options
context:
space:
mode:
authorJarrod Millman <millman@berkeley.edu>2007-11-28 05:12:37 +0000
committerJarrod Millman <millman@berkeley.edu>2007-11-28 05:12:37 +0000
commit6c00b1141fdfa7d168a9b82e6ab493c77f7c1621 (patch)
tree0e9b0714a7d0a5e83ca3d321b4d9aca588347f4a /numpy/testing/utils.py
parent3fe715c0d0deb78ace46c3dbaf3165e8c4283e3c (diff)
downloadnumpy-6c00b1141fdfa7d168a9b82e6ab493c77f7c1621.tar.gz
use 'in' keyword to test dictionary membership
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r--numpy/testing/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py
index e21fca5ed..89fff6c25 100644
--- a/numpy/testing/utils.py
+++ b/numpy/testing/utils.py
@@ -130,7 +130,7 @@ def assert_equal(actual,desired,err_msg='',verbose=True):
assert isinstance(actual, dict), repr(type(actual))
assert_equal(len(actual),len(desired),err_msg,verbose)
for k,i in desired.items():
- assert actual.has_key(k), repr(k)
+ assert k in actual, repr(k)
assert_equal(actual[k], desired[k], 'key=%r\n%s' % (k,err_msg), verbose)
return
if isinstance(desired, (list,tuple)) and isinstance(actual, (list,tuple)):