Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ resize
Method
resize
Lib/test/test_bytes.py:1768–1769 ·
view source on GitHub ↗
(n)
Source
from the content-addressed store, hash-verified
1766
b = bytearray(range(10))
1767
v = memoryview(b)
1768
def
resize(n):
1769
b[1:-1] = range(n + 1, 2*n - 1)
1770
resize(10)
1771
orig = b[:]
1772
self.assertRaises(BufferError, resize, 11)
Callers
12
write
Method · 0.45
readall
Method · 0.45
test_basic
Method · 0.45
test_access_parameter
Method · 0.45
test_offset
Method · 0.45
test_crasher_on_windows
Method · 0.45
test_resize_past_pos
Method · 0.45
test_resize_up_when_mapped_to_pagefile
Method · 0.45
test_resize_down_when_mapped_to_pagefile
Method · 0.45
test_resize_fails_if_mapping_held_elsewhere
Method · 0.45
test_resize_succeeds_with_error_for_second_named_mapping
Method · 0.45
byteslike
Function · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected