We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eecebef commit 3ca003aCopy full SHA for 3ca003a
extra_tests/snippets/builtin_slice.py
@@ -1,5 +1,4 @@
1
from testutils import assert_raises
2
-import sys
3
4
a = []
5
assert a[:] == []
@@ -130,5 +129,3 @@ def test_all_slices():
130
129
131
132
test_all_slices()
133
-
134
-assert_raises(IndexError, lambda: b[::0], _msg='bytearray index out of range')
extra_tests/snippets/bytearray.py
@@ -1,5 +1,6 @@
import pickle
+import sys
# new
6
assert bytearray([1, 2, 3])
@@ -753,4 +754,8 @@ class B(bytearray):
753
754
assert type(a) == type(b)
755
assert a.x == b.x
756
assert a.y == b.y
-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