(self, r)
| 2354 | |
| 2355 | @skip_if_server_version_lt("8.7.0") |
| 2356 | def test_increx_expiration_enx(self, r): |
| 2357 | key = "increx:expiration" |
| 2358 | assert r.set(key, 40) |
| 2359 | assert r.ttl(key) == -1 |
| 2360 | |
| 2361 | assert r.increx(key, byint=2, ex=60, enx=True) == [42, 2] |
| 2362 | ttl = r.ttl(key) |
| 2363 | assert 0 < ttl <= 60 |
| 2364 | |
| 2365 | assert r.increx(key, byint=3, ex=600, enx=True) == [45, 3] |
| 2366 | assert 0 < r.ttl(key) <= ttl |
| 2367 | |
| 2368 | def test_increx_invalid_options(self, r): |
| 2369 | key = "increx:invalid" |