MCPcopy Index your code
hub / github.com/python/cpython / create_data

Function create_data

Lib/test/pickletester.py:719–737  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

717
718
719def create_data():
720 c = C()
721 c.foo = 1
722 c.bar = 2
723 x = [0, 1, 2.0, 3.0+0j]
724 # Append some integer test cases at cPickle.c's internal size
725 # cutoffs.
726 uint1max = 0xff
727 uint2max = 0xffff
728 int4max = 0x7fffffff
729 x.extend([1, -1,
730 uint1max, -uint1max, -uint1max-1,
731 uint2max, -uint2max, -uint2max-1,
732 int4max, -int4max, -int4max-1])
733 y = ('abc', 'abc', c, c)
734 x.append(y)
735 x.append(y)
736 x.append(5)
737 return x
738
739
740class AbstractUnpickleTests:

Callers 3

fast_save_enterMethod · 0.85
pickletester.pyFile · 0.85

Calls 3

CClass · 0.70
extendMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…