This commit is contained in:
carbotaniuman
2020-12-30 11:53:49 -06:00
parent eecebef0e0
commit 3ca003a94d
2 changed files with 6 additions and 4 deletions

View File

@@ -1,5 +1,4 @@
from testutils import assert_raises
import sys
a = []
assert a[:] == []
@@ -130,5 +129,3 @@ def test_all_slices():
test_all_slices()
assert_raises(IndexError, lambda: b[::0], _msg='bytearray index out of range')

View File

@@ -1,5 +1,6 @@
from testutils import assert_raises
import pickle
import sys
# new
assert bytearray([1, 2, 3])
@@ -753,4 +754,8 @@ b = pickle.loads(pickle.dumps(a, 4))
assert type(a) == type(b)
assert a.x == b.x
assert a.y == b.y
assert a == b
assert a == b
a = bytearray()
for i in range(-1, 2, 1):
assert_raises(IndexError, lambda: a[-sys.maxsize - i], _msg='bytearray index out of range')