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

Class RaisingBytes

Lib/test/test_long.py:1593–1595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1591 return 'abc'
1592 class MissingBytes: ...
1593 class RaisingBytes:
1594 def __bytes__(self):
1595 1 / 0
1596
1597 self.assertEqual(int.from_bytes(ValidBytes()), 1)
1598 self.assertRaises(TypeError, int.from_bytes, InvalidBytes())

Callers 1

test_from_bytesMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_from_bytesMethod · 0.68