Skip to content

Commit 3ca003a

Browse files
committed
Fix test
1 parent eecebef commit 3ca003a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

extra_tests/snippets/builtin_slice.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from testutils import assert_raises
2-
import sys
32

43
a = []
54
assert a[:] == []
@@ -130,5 +129,3 @@ def test_all_slices():
130129

131130

132131
test_all_slices()
133-
134-
assert_raises(IndexError, lambda: b[::0], _msg='bytearray index out of range')

extra_tests/snippets/bytearray.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from testutils import assert_raises
22
import pickle
3+
import sys
34

45
# new
56
assert bytearray([1, 2, 3])
@@ -753,4 +754,8 @@ class B(bytearray):
753754
assert type(a) == type(b)
754755
assert a.x == b.x
755756
assert a.y == b.y
756-
assert a == b
757+
assert a == b
758+
759+
a = bytearray()
760+
for i in range(-1, 2, 1):
761+
assert_raises(IndexError, lambda: a[-sys.maxsize - i], _msg='bytearray index out of range')

0 commit comments

Comments
 (0)