Skip to content

Commit 6c82357

Browse files
Update run-integers.test
1 parent 9a27e5d commit 6c82357

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mypyc/test-data/run-integers.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -578,12 +578,12 @@ from testutil import assertRaises
578578
def to_bytes(n: int, length: int, byteorder: str, signed: bool = False) -> bytes:
579579
return n.to_bytes(length, byteorder, signed=signed)
580580
def test_to_bytes() -> None:
581-
assert to_bytes(255, 2, "big") == b'\x00\xff'
582-
assert to_bytes(255, 2, "little") == b'\xff\x00'
583-
assert to_bytes(-1, 2, "big", True) == b'\xff\xff'
584-
assert to_bytes(0, 1, "big") == b'\x00'
581+
assert to_bytes(255, 2, "big") == b'\x00\xff', to_bytes(255, 2, "big")
582+
assert to_bytes(255, 2, "little") == b'\xff\x00', to_bytes(255, 2, "little")
583+
assert to_bytes(-1, 2, "big", True) == b'\xff\xff', to_bytes(-1, 2, "big", True)
584+
assert to_bytes(0, 1, "big") == b'\x00', to_bytes(0, 1, "big")
585585
# test with a value that does not fit in 64 bits
586-
assert to_bytes(10**30, 16, "big") == b'\x00\x00\x00\x0c\x9f,\x9c\xd0Ft\xed\xea@\x00\x00\x00'
586+
assert to_bytes(10**30, 16, "big") == b'\x00\x00\x00\x0c\x9f,\x9c\xd0Ft\xed\xea@\x00\x00\x00', to_bytes(10**30, 16, "big")
587587
# unsigned, too large for 1 byte
588588
with assertRaises(OverflowError):
589589
to_bytes(256, 1, "big")

0 commit comments

Comments
 (0)