This commit is contained in:
Fredrik Bore
2024-06-24 13:37:29 +02:00
parent e7050b633d
commit 5a7cf63755
+4
View File
@@ -33,6 +33,7 @@ from contextlib import nullcontext as does_not_raise
from copy import deepcopy
from io import StringIO
from unittest import mock
import uuid
import pytest
from pyproj.exceptions import CRSError
@@ -142,6 +143,9 @@ def test_json_serial():
d = Decimal(1.0)
assert util.json_serial(d) == 1.0
d = uuid.UUID('12345678-1234-5678-1234-567812345678')
assert util.json_serial(d) == '12345678-1234-5678-1234-567812345678'
with pytest.raises(TypeError):
util.json_serial('foo')