Skip to content

Commit

Permalink
black .
Browse files Browse the repository at this point in the history
  • Loading branch information
amirreza8002 committed Sep 15, 2024
1 parent a30da9d commit 016f0aa
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions tests/tests_async/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,32 +331,32 @@ async def test_incr_no_timeout(self, cache: AsyncValkeyCache):
# if isinstance(cache.client, AsyncHerdClient):
# pytest.skip("HerdClient doesn't support incr")

await cache.aset("num", 1, timeout=None)
await cache.aset("num", 1, timeout=None)

await cache.aincr("num")
res = await cache.aget("num")
assert res == 2
await cache.aincr("num")
res = await cache.aget("num")
assert res == 2

await cache.aincr("num", 10)
res = await cache.aget("num")
assert res == 12
await cache.aincr("num", 10)
res = await cache.aget("num")
assert res == 12

# max 64-bit signed int
await cache.aset("num", 9223372036854775807, timeout=None)
# max 64-bit signed int
await cache.aset("num", 9223372036854775807, timeout=None)

await cache.aincr("num")
res = await cache.aget("num")
assert res == 9223372036854775808
await cache.aincr("num")
res = await cache.aget("num")
assert res == 9223372036854775808

await cache.aincr("num", 2)
res = await cache.aget("num")
assert res == 9223372036854775810
await cache.aincr("num", 2)
res = await cache.aget("num")
assert res == 9223372036854775810

await cache.aset("num", 3, timeout=None)
await cache.aset("num", 3, timeout=None)

await cache.aincr("num", 2)
res = await cache.aget("num")
assert res == 5
await cache.aincr("num", 2)
res = await cache.aget("num")
assert res == 5

async def test_incr_error(self, cache: AsyncValkeyCache):
# if isinstance(cache.client, AsyncHerdClient):
Expand Down

0 comments on commit 016f0aa

Please sign in to comment.