diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-09-26 17:32:27 +0000 |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-09-26 17:32:27 +0000 |
commit | d635b1d724e79a1d2dce416b29a95c389fdfab30 (patch) | |
tree | 91545a903b9628f4a592b6d911fd9bd23d7510b6 /Lib/dos-8x3/test_arr.py | |
parent | 0872e0585196a894c8c2c2dbea1a0fdd68391c90 (diff) | |
download | cpython-git-d635b1d724e79a1d2dce416b29a95c389fdfab30.tar.gz |
The Usual
Diffstat (limited to 'Lib/dos-8x3/test_arr.py')
-rw-r--r-- | Lib/dos-8x3/test_arr.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Lib/dos-8x3/test_arr.py b/Lib/dos-8x3/test_arr.py index d3fe7e9c2c..fb451a9132 100644 --- a/Lib/dos-8x3/test_arr.py +++ b/Lib/dos-8x3/test_arr.py @@ -122,9 +122,14 @@ def testtype(type, example): a.pop() a.pop() a.pop() - a.pop() + x = a.pop() + if x != 'e': + raise TestFailed, "array(%s) pop-test" % `type` if a != array.array(type, "acd"): raise TestFailed, "array(%s) pop-test" % `type` + a.reverse() + if a != array.array(type, "dca"): + raise TestFailed, "array(%s) reverse-test" % `type` else: a = array.array(type, [1, 2, 3, 4, 5]) a[:-1] = a @@ -155,9 +160,14 @@ def testtype(type, example): a.pop() a.pop() a.pop() - a.pop() + x = a.pop() + if x != 5: + raise TestFailed, "array(%s) pop-test" % `type` if a != array.array(type, [1, 3, 4]): raise TestFailed, "array(%s) pop-test" % `type` + a.reverse() + if a != array.array(type, [4, 3, 1]): + raise TestFailed, "array(%s) reverse-test" % `type` # test that overflow exceptions are raised as expected for assignment # to array of specific integral types |