MCPcopy Index your code
hub / github.com/RustPython/RustPython / Unpickler

Class Unpickler

Lib/test/pickletester.py:1298–1300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1296 def test_custom_find_class(self):
1297 def loads(data):
1298 class Unpickler(self.unpickler):
1299 def find_class(self, module_name, global_name):
1300 return (module_name, global_name)
1301 return Unpickler(io.BytesIO(data)).load()
1302
1303 self.assertEqual(loads(b'cmath\nlog\n.'), ('math', 'log'))

Callers 8

__getitem__Method · 0.90
set_locationMethod · 0.90
nextMethod · 0.90
previousMethod · 0.90
firstMethod · 0.90
lastMethod · 0.90
checkMethod · 0.85
loadsMethod · 0.85

Calls

no outgoing calls

Tested by 2

checkMethod · 0.68
loadsMethod · 0.68