diff --git a/src/ifcopenshell-python/test/test_streaming_rocksdb_and_simpletyperefs.py b/src/ifcopenshell-python/test/test_streaming_rocksdb_and_simpletyperefs.py index a10a6ee5d4..d7d2e7f440 100644 --- a/src/ifcopenshell-python/test/test_streaming_rocksdb_and_simpletyperefs.py +++ b/src/ifcopenshell-python/test/test_streaming_rocksdb_and_simpletyperefs.py @@ -111,9 +111,11 @@ def test_rocks(): assert f[139].RelatingPropertyDefinition.is_a("IfcPropertySetDefinitionSet") assert {x.id() for x in f[139].RelatingPropertyDefinition[0]} == {136, 138} - b = f.key_value_store_query("i|139|5")[2:] + # Numeric key segments are fixed-width hex: i||, + # t||. See rocksdb_map_adapter.h. + b = f.key_value_store_query(f"i|{139:016x}|{5:016x}")[2:] iden = struct.unpack("Q", b)[0] - b = f.key_value_store_query(f"t|{iden}|0")[1:] + b = f.key_value_store_query(f"t|{iden:016x}|{0:016x}")[1:] assert set(struct.unpack("Q", b[i : i + 8])[0] for i in range(1, len(b), 9)) == {136, 138} g = ifcopenshell.open(fn)