Test: add a failing test for big int

This commit is contained in:
Fabian Dill
2025-08-03 10:54:17 +02:00
parent c6df02a355
commit 43100f2c43

View 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))