(self, r)
| 2319 | |
| 2320 | @skip_if_server_version_lt("8.7.0") |
| 2321 | def test_increx_saturating_bounds(self, r): |
| 2322 | key = "increx:sat" |
| 2323 | assert r.set(key, "1.8") |
| 2324 | result = r.increx(key, byfloat=0.7, ubound=2, saturate=True) |
| 2325 | assert [float(value) for value in result] == pytest.approx([2.0, 0.2]) |
| 2326 | assert float(r[key]) == pytest.approx(2.0) |
| 2327 | |
| 2328 | @skip_if_server_version_lt("8.7.0") |
| 2329 | def test_increx_overflow_rejected_keeps_value_and_ttl(self, r): |