summaryrefslogtreecommitdiffstats
path: root/tests/unittests/command_parse/test_list_parse.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-07-04 07:58:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-07-04 07:58:56 +0000
commita785d1c2de7d227674051b865935013bdd27e60f (patch)
treecf642e98373f0a1b8fbc5e772c30c334f2cd4d30 /tests/unittests/command_parse/test_list_parse.py
parentAdding upstream version 1.11.1. (diff)
downloadiredis-a785d1c2de7d227674051b865935013bdd27e60f.tar.xz
iredis-a785d1c2de7d227674051b865935013bdd27e60f.zip
Adding upstream version 1.12.0.upstream/1.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/unittests/command_parse/test_list_parse.py')
-rw-r--r--tests/unittests/command_parse/test_list_parse.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/unittests/command_parse/test_list_parse.py b/tests/unittests/command_parse/test_list_parse.py
index e60d7a2..69a294e 100644
--- a/tests/unittests/command_parse/test_list_parse.py
+++ b/tests/unittests/command_parse/test_list_parse.py
@@ -41,6 +41,18 @@ def test_brpoplpush(judge_command):
judge_command("BRPOPLPUSH list1 list2 -1", None)
+def test_brpoplpush_with_double_timeout(judge_command):
+ judge_command(
+ "BRPOPLPUSH list1 list2 10.0",
+ {"command": "BRPOPLPUSH", "key": "list1", "newkey": "list2", "timeout": "10.0"},
+ )
+ judge_command(
+ "BRPOPLPUSH list1 list2 .2",
+ {"command": "BRPOPLPUSH", "key": "list1", "newkey": "list2", "timeout": ".2"},
+ )
+ judge_command("BRPOPLPUSH list1 list2 12.", None)
+
+
def test_linsert(judge_command):
judge_command(
'LINSERT mylist BEFORE "World" "There"',
@@ -106,3 +118,26 @@ def test_lpos(judge_command):
"rank": "-1",
},
)
+
+
+def test_blmove(judge_command):
+ judge_command(
+ "blmove list1 list2 left right 1.2",
+ {
+ "command": "blmove",
+ "key": ["list1", "list2"],
+ "lr_const": ["left", "right"],
+ "timeout": "1.2",
+ },
+ )
+ judge_command(
+ "blmove list1 list2 right right .2",
+ {
+ "command": "blmove",
+ "key": ["list1", "list2"],
+ "lr_const": ["right", "right"],
+ "timeout": ".2",
+ },
+ )
+ judge_command("blmove list1 list2 right right", None)
+ judge_command("blmove list1 right right 1", None)