From 6b988f8cc8bff55c4f5c5765b882a6a251eac6e4 Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Thu, 20 Jun 2024 18:02:30 +0300 Subject: [PATCH] [#3287] address review --- doc/sphinx/api2doc.py | 2 +- src/bin/shell/tests/shell_unittest.py.in | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/doc/sphinx/api2doc.py b/doc/sphinx/api2doc.py index 7787ab310e..cc78e21bf2 100755 --- a/doc/sphinx/api2doc.py +++ b/doc/sphinx/api2doc.py @@ -42,7 +42,7 @@ def read_input_files(files): print(f'\nError while processing {f}: {e}\n\n') raise if name != descr['name']: - raise ValueError("Expected name == descr['name']. Name is {name} and descr['name'] is {descr['name']}.") + raise ValueError(f"Expected name == descr['name']. Name is {name}, descr['name'] is {descr['name']}.") apis[name] = descr diff --git a/src/bin/shell/tests/shell_unittest.py.in b/src/bin/shell/tests/shell_unittest.py.in index f4296460d2..e707d79a2f 100644 --- a/src/bin/shell/tests/shell_unittest.py.in +++ b/src/bin/shell/tests/shell_unittest.py.in @@ -162,12 +162,8 @@ class CARequestUnitTest(unittest.TestCase): """ This test check if the basic HTTP authentication uses UTF-8 encoding. """ - if sys.version_info[0] == 3: - user = 'libert\xe9' - password = '\xe9galit\xe9' - else: - user = 'libert\xe9' - password = '\xe9galit\xe9' + user = 'libert\xe9' + password = '\xe9galit\xe9' buser = user.encode('utf-8') bpassword = password.encode('utf-8') secret = b':'.join((buser, bpassword)) -- 2.47.2