Skip to content

Commit 737bac1

Browse files
andfoyjonathanunderwood
authored andcommitted
Copy memoryview on test_1
1 parent 7a88fb9 commit 737bac1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/block/test_block_0.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ def setup_kwargs(mode, store_size, c_return_bytearray=None, d_return_bytearray=N
7070

7171
# Test single threaded usage with all valid variations of input
7272
def test_1(data, mode, store_size, c_return_bytearray, d_return_bytearray, dictionary):
73+
if isinstance(data, memoryview):
74+
data = memoryview(copy.deepcopy(data.obj))
75+
elif isinstance(data, bytearray):
76+
data_x = bytearray()
77+
data_x[:] = data
78+
data = data_x
79+
7380
(c_kwargs, d_kwargs) = setup_kwargs(
7481
mode, store_size, c_return_bytearray, d_return_bytearray)
7582

0 commit comments

Comments
 (0)