Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ SubStr
Class
SubStr
Lib/test/test_long.py:1397–1398 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1395
1396
# gh-98783
1397
class
SubStr(str):
1398
pass
1399
self.assertEqual((0).to_bytes(1, SubStr(
'big'
)), b
'\x00'
)
1400
self.assertEqual((0).to_bytes(0, SubStr(
'little'
)), b
''
)
1401
Callers
2
test_to_bytes
Method · 0.70
test_from_bytes
Method · 0.70
Calls
no outgoing calls
Tested by
2
test_to_bytes
Method · 0.56
test_from_bytes
Method · 0.56