1
0
Fork 0

Merging upstream version 1.14.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 17:23:39 +01:00
parent bd96b2e60a
commit e30705f8de
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
24 changed files with 55 additions and 96 deletions

View file

@ -19,7 +19,7 @@ def test_log_location_config():
log = Path("/tmp/iredis1.log")
assert log.exists()
with open(log, "r") as logfile:
with open(log) as logfile:
content = logfile.read()
assert len(content) > 100

View file

@ -10,7 +10,7 @@ def test_history_not_log_auth(cli):
cli.sendline("set foo bar")
cli.expect("OK")
with open(os.path.expanduser("~/.iredis_history"), "r") as history_file:
with open(os.path.expanduser("~/.iredis_history")) as history_file:
content = history_file.read()
assert "set foo bar" in content
@ -36,7 +36,7 @@ def test_history_create_and_writing_with_config():
log = Path("/tmp/iredis_history.txt")
assert log.exists()
with open(log, "r") as logfile:
with open(log) as logfile:
content = logfile.read()
assert "set hello world" in content

View file

@ -13,12 +13,12 @@ TEST_IREDISRC = "/tmp/.iredisrc.test"
TEST_PAGER_BOUNDARY = "---boundary---"
TEST_PAGER_BOUNDARY_NUMBER = "---88938347271---"
env_pager = "{0} {1} {2}".format(
env_pager = "{} {} {}".format(
sys.executable,
os.path.join(pathlib.Path(__file__).parent, "wrappager.py"),
TEST_PAGER_BOUNDARY,
)
env_pager_numbers = "{0} {1} {2}".format(
env_pager_numbers = "{} {} {}".format(
sys.executable,
os.path.join(pathlib.Path(__file__).parent, "wrappager.py"),
TEST_PAGER_BOUNDARY_NUMBER,

View file

@ -53,7 +53,7 @@ def judge_command():
return
variables = m.variables()
print("Found variables: {}".format(variables))
print(f"Found variables: {variables}")
for expect_token, expect_value in expect.items():
all_variables = variables.getall(expect_token)
if len(all_variables) > 1:

View file

@ -174,6 +174,19 @@ def test_command_shell_options_higher_priority():
verify_ssl=None,
),
),
(
"redis://username:pass@word@localhost:12345/2",
DSN(
scheme="redis",
host="localhost",
port=12345,
path=None,
db=2,
username="username",
password="pass@word",
verify_ssl=None,
),
),
(
"redis://username@localhost:12345",
DSN(

View file

@ -55,6 +55,7 @@ def test_timer():
(r'""', [""]), # set foo "" is a legal command
(r"\\", ["\\\\"]), # backslash are legal
("\\hello\\", ["\\hello\\"]), # backslash are legal
('foo "bar\\n1"', ["foo", "bar\n1"]),
],
)
def test_stripe_quote_escape_in_quote(test_input, expected):