MCPcopy
hub / github.com/redis/redis-py / test_add_elem_no_quant

Function test_add_elem_no_quant

tests/test_vsets.py:79–90  ·  view source on GitHub ↗
(d_client)

Source from the content-addressed store, hash-verified

77
78@skip_if_server_version_lt("7.9.0")
79def test_add_elem_no_quant(d_client):
80 float_array = [1, 4.32, 0.11, 0.5, 0.9]
81 resp = d_client.vset().vadd(
82 "myset",
83 vector=float_array,
84 element="elem1",
85 quantization=QuantizationOptions.NOQUANT,
86 )
87 assert resp == 1
88
89 emb = d_client.vset().vemb("myset", "elem1")
90 assert _validate_quantization(float_array, emb, tolerance=0.0)
91
92
93@skip_if_server_version_lt("7.9.0")

Callers

nothing calls this directly

Calls 4

vaddMethod · 0.80
vembMethod · 0.80
_validate_quantizationFunction · 0.70
vsetMethod · 0.45

Tested by

no test coverage detected