From a785d1c2de7d227674051b865935013bdd27e60f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 4 Jul 2022 09:58:56 +0200 Subject: Adding upstream version 1.12.0. Signed-off-by: Daniel Baumann --- tests/unittests/command_parse/test_list_parse.py | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'tests/unittests/command_parse/test_list_parse.py') 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) -- cgit v1.2.3