From: henadzit Date: Fri, 7 Feb 2025 17:03:43 +0000 (+0100) Subject: test(c): test UUID.__slots__ X-Git-Tag: 3.2.5~2^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a9ade78e7060b292b66575703660474b96df292;p=thirdparty%2Fpsycopg.git test(c): test UUID.__slots__ --- 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