mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-23 08:43:22 -07:00
Test: add a failing test for big int
This commit is contained in:
11
test/netutils/test_serialize.py
Normal file
11
test/netutils/test_serialize.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import orjson
|
||||
import unittest
|
||||
from NetUtils import encode, decode
|
||||
|
||||
|
||||
class TestSerialize(unittest.TestCase):
|
||||
def test_unbounded_int(self) -> None:
|
||||
big_number = 2**200
|
||||
round_tripped_big_number = decode(encode(orjson.Fragment(str(big_number).encode())))
|
||||
self.assertEqual(big_number, round_tripped_big_number)
|
||||
self.assertEqual(type(big_number), type(round_tripped_big_number))
|
||||
Reference in New Issue
Block a user