forked from Rust-related/RustPython
Fix test
This commit is contained in:
@@ -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')
|
||||
@@ -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')
|
||||
Reference in New Issue
Block a user