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

Method test_module_func

Lib/test/test_struct.py:910–916  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

908 self.assertEqual(lh(it), 0)
909
910 def test_module_func(self):
911 # Sanity check for the global struct.iter_unpack()
912 it = struct.iter_unpack('>IB', bytes(range(1, 11)))
913 self.assertEqual(next(it), (0x01020304, 5))
914 self.assertEqual(next(it), (0x06070809, 10))
915 self.assertRaises(StopIteration, next, it)
916 self.assertRaises(StopIteration, next, it)
917
918 def test_half_float(self):
919 _testcapi = import_helper.import_module('_testcapi')

Callers

nothing calls this directly

Calls 4

nextFunction · 0.85
iter_unpackMethod · 0.80
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected