Skip to content

Commit 6aa425b

Browse files
committed
Fix newint.to_bytes and newint.from_bytes tests to use a newint
1 parent 5dfd8de commit 6aa425b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

future/tests/test_int.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ def check(tests, byteorder, signed=False):
784784
for test, expected in tests.items():
785785
try:
786786
self.assertEqual(
787-
test.to_bytes(len(expected), byteorder, signed=signed),
787+
int(test).to_bytes(len(expected), byteorder, signed=signed),
788788
expected)
789789
except Exception as err:
790790
raise_from(AssertionError(
@@ -884,7 +884,7 @@ def check(tests, byteorder, signed=False):
884884
try:
885885
self.assertEqual(
886886
int.from_bytes(test, byteorder, signed=signed),
887-
expected)
887+
int(expected))
888888
except Exception as err:
889889
raise_from(AssertionError(
890890
"failed to convert {0} with byteorder={1!r} and signed={2}"

0 commit comments

Comments
 (0)