Author: Philip Jenvey <pjen...@underboss.org> Branch: Changeset: r83673:3d517af71821 Date: 2016-04-14 17:16 -0700 http://bitbucket.org/pypy/pypy/changeset/3d517af71821/
Log: fix range check thinko; calculate w/ bits not bytes diff --git a/pypy/module/array/test/test_array.py b/pypy/module/array/test/test_array.py --- a/pypy/module/array/test/test_array.py +++ b/pypy/module/array/test/test_array.py @@ -99,12 +99,13 @@ for tc in 'BHIL': a = self.array(tc) - vals = [0, 2 ** a.itemsize - 1] + itembits = a.itemsize * 8 + vals = [0, 2 ** itembits - 1] a.fromlist(vals) assert a.tolist() == vals a = self.array(tc.lower()) - vals = [-1 * (2 ** a.itemsize) / 2, (2 ** a.itemsize) / 2 - 1] + vals = [-1 * (2 ** itembits) / 2, (2 ** itembits) / 2 - 1] a.fromlist(vals) assert a.tolist() == vals _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit