Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ test_roundtrip
Method
test_roundtrip
extra_tests/snippets/stdlib_marshal.py:69–75 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
67
)
68
69
def
test_roundtrip(self):
70
orig = compile(
"1 + 1"
,
""
,
"eval"
)
71
72
dumped = marshal.dumps(orig)
73
loaded = marshal.loads(dumped)
74
75
assert eval(loaded) == eval(orig)
76
77
78
if
__name__ ==
"__main__"
:
Callers
nothing calls this directly
Calls
4
compile
Function · 0.50
eval
Function · 0.50
dumps
Method · 0.45
loads
Method · 0.45
Tested by
no test coverage detected