summaryrefslogtreecommitdiff
path: root/numpy/testing/utils.py
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2006-06-30 21:56:21 +0000
committerStefan van der Walt <stefan@sun.ac.za>2006-06-30 21:56:21 +0000
commit3584a117f79ae0ce6d18bc241ce533d11bc1f800 (patch)
treeb5f86cce79ce931cedbec965f5b8020d5a3bd780 /numpy/testing/utils.py
parent7d4055d0d856ef1bfa4b65052acb7164923a7cdf (diff)
downloadnumpy-3584a117f79ae0ce6d18bc241ce533d11bc1f800.tar.gz
Make 'assert_equal' handle tuples (not only lists). Closes #163.
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 11e3b95d3..ee7439d50 100644
--- a/numpy/testing/utils.py
+++ b/numpy/testing/utils.py
@@ -129,7 +129,7 @@ def assert_equal(actual,desired,err_msg='',verbose=True):
assert actual.has_key(k),`k`
assert_equal(actual[k], desired[k], 'key=%r\n%s' % (k,err_msg), verbose)
return
- if isinstance(desired, list) and isinstance(actual, list):
+ if isinstance(desired, (list,tuple)) and isinstance(actual, (list,tuple)):
assert_equal(len(actual),len(desired),err_msg,verbose)
for k in range(len(desired)):
assert_equal(actual[k], desired[k], 'item=%r\n%s' % (k,err_msg), verbose)