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

Method test_from_bytes_small

Lib/test/test_long.py:1609–1613  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1607
1608 @support.cpython_only
1609 def test_from_bytes_small(self):
1610 # bpo-46361
1611 for i in range(-5, 257):
1612 b = i.to_bytes(2, signed=True)
1613 self.assertIs(int.from_bytes(b, signed=True), i)
1614
1615 def test_is_integer(self):
1616 self.assertTrue((-1).is_integer())

Callers

nothing calls this directly

Calls 3

to_bytesMethod · 0.80
assertIsMethod · 0.45
from_bytesMethod · 0.45

Tested by

no test coverage detected