diff options
author | Raymond Hettinger <python@rcn.com> | 2003-01-07 01:58:52 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-01-07 01:58:52 (GMT) |
commit | 625812f6184438d33ac0f2d70ab1276691a30162 (patch) | |
tree | fab1b113e664b2c3933419c95968c868e55beafd /Lib/test/test_array.py | |
parent | 4e68a1ec6c8b89d4fad70cf54eaa70ae32d66054 (diff) | |
download | cpython-625812f6184438d33ac0f2d70ab1276691a30162.zip cpython-625812f6184438d33ac0f2d70ab1276691a30162.tar.gz cpython-625812f6184438d33ac0f2d70ab1276691a30162.tar.bz2 |
SF patch #662433: Fill arraymodule's tp_iter and sq_contains slots
Diffstat (limited to 'Lib/test/test_array.py')
-rwxr-xr-x | Lib/test/test_array.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index b650033..6aa3cf0 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -356,6 +356,12 @@ def testtype(type, example): a[2:3] = ins b[slice(2,3)] = ins c[2:3:] = ins + # iteration and contains + a = array.array(type, range(10)) + vereq(list(a), range(10)) + b = array.array(type, [20]) + vereq(a[-1] in a, True) + vereq(b[0] not in a, True) # test that overflow exceptions are raised as expected for assignment # to array of specific integral types |