Add test for UUID hash

This commit is contained in:
Josh Wu
2026-03-04 00:22:50 +08:00
parent 28e485b7b3
commit 2915cb8bb6

View File

@@ -73,6 +73,14 @@ def test_uuid_to_hex_str() -> None:
) )
# -----------------------------------------------------------------------------
def test_uuid_hash() -> None:
uuid = UUID("1234")
uuid_128_bytes = UUID.from_bytes(uuid.to_bytes(force_128=True))
assert uuid in {uuid_128_bytes}
assert uuid_128_bytes in {uuid}
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
def test_appearance() -> None: def test_appearance() -> None:
a = Appearance(Appearance.Category.COMPUTER, Appearance.ComputerSubcategory.LAPTOP) a = Appearance(Appearance.Category.COMPUTER, Appearance.ComputerSubcategory.LAPTOP)