From e09a8f321f5031c33ba28d9b97932887b604e311 Mon Sep 17 00:00:00 2001 From: henadzit Date: Fri, 7 Feb 2025 18:03:43 +0100 Subject: [PATCH] test(c): test UUID.__slots__ --- tests/types/test_uuid.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/types/test_uuid.py b/tests/types/test_uuid.py index 6dd823292..94dbabde2 100644 --- a/tests/types/test_uuid.py +++ b/tests/types/test_uuid.py @@ -47,6 +47,11 @@ def test_uuid_load(conn, fmt_out, val): assert res.int == uuid_val.int assert res.bytes == uuid_val.bytes assert res.is_safe == uuid_val.is_safe + # https://github.com/python/typeshed/issues/8832 + slots = ("int", "is_safe", "__weakref__") + assert ( + UUID.__slots__ == slots # type: ignore[attr-defined] + ), "UUID structure changed" @pytest.mark.slow -- 2.47.2