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

Method check_sizeof

Lib/test/test_struct.py:590–595  ·  view source on GitHub ↗
(self, format_str, number_of_codes)

Source from the content-addressed store, hash-verified

588 s.__init__('ii')
589
590 def check_sizeof(self, format_str, number_of_codes):
591 # The size of 'PyStructObject'
592 totalsize = support.calcobjsize('2n3P')
593 # The size taken up by the 'formatcode' dynamic array
594 totalsize += struct.calcsize('P3n0P') * (number_of_codes + 1)
595 support.check_sizeof(self, struct.Struct(format_str), totalsize)
596
597 @support.cpython_only
598 def test__sizeof__(self):

Callers 7

test__sizeof__Method · 0.95
test_elementMethod · 0.45
test_sizeofMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected