From 5a7cf637550cc4c2ddfdb426e2b54f8014e3a67a Mon Sep 17 00:00:00 2001 From: Fredrik Bore Date: Mon, 24 Jun 2024 13:37:29 +0200 Subject: [PATCH] Tests --- tests/test_util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_util.py b/tests/test_util.py index 262cfcd..c71ce80 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -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')