diff options
author | snowball <snowball@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
commit | 4d57126b1bae3cfd0f4f95c32d1a85ca684ee92c (patch) | |
tree | 9aa76172d0e8abdf7c78fce6ec639c5d7e62b459 /library/python/testing | |
parent | 249e91c445cb92462f9509d1ef2730b27629f43d (diff) | |
download | ydb-4d57126b1bae3cfd0f4f95c32d1a85ca684ee92c.tar.gz |
Restoring authorship annotation for <snowball@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/python/testing')
-rw-r--r-- | library/python/testing/yatest_common/yatest/common/canonical.py | 22 | ||||
-rw-r--r-- | library/python/testing/yatest_common/yatest/common/network.py | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/canonical.py b/library/python/testing/yatest_common/yatest/common/canonical.py index b6a136d3e9..023a619fa1 100644 --- a/library/python/testing/yatest_common/yatest/common/canonical.py +++ b/library/python/testing/yatest_common/yatest/common/canonical.py @@ -63,8 +63,8 @@ def canonical_execute( binary, args=None, check_exit_code=True, shell=False, timeout=None, cwd=None, env=None, stdin=None, stderr=None, creationflags=0, - file_name=None, save_locally=False, close_fds=False, - diff_tool=None, diff_file_name=None, diff_tool_timeout=None, + file_name=None, save_locally=False, close_fds=False, + diff_tool=None, diff_file_name=None, diff_tool_timeout=None, ): """ Shortcut to execute a binary and canonize its stdout @@ -81,7 +81,7 @@ def canonical_execute( :param file_name: output file name. if not specified program name will be used :param diff_tool: path to custome diff tool :param diff_file_name: custom diff file name to create when diff is found - :param diff_tool_timeout: timeout for running diff tool + :param diff_tool_timeout: timeout for running diff tool :return: object that can be canonized """ if type(binary) == list: @@ -98,10 +98,10 @@ def canonical_execute( del execute_args["save_locally"] del execute_args["diff_tool"] del execute_args["diff_file_name"] - del execute_args["diff_tool_timeout"] + del execute_args["diff_tool_timeout"] if not file_name and stdin: file_name = os.path.basename(stdin.name) - return _canonical_execute(process.execute, execute_args, file_name, save_locally, diff_tool, diff_file_name, diff_tool_timeout) + return _canonical_execute(process.execute, execute_args, file_name, save_locally, diff_tool, diff_file_name, diff_tool_timeout) def canonical_py_execute( @@ -109,7 +109,7 @@ def canonical_py_execute( shell=False, timeout=None, cwd=None, env=None, stdin=None, stderr=None, creationflags=0, file_name=None, save_locally=False, close_fds=False, - diff_tool=None, diff_file_name=None, diff_tool_timeout=None, + diff_tool=None, diff_file_name=None, diff_tool_timeout=None, ): """ Shortcut to execute a python script and canonize its stdout @@ -126,7 +126,7 @@ def canonical_py_execute( :param file_name: output file name. if not specified program name will be used :param diff_tool: path to custome diff tool :param diff_file_name: custom diff file name to create when diff is found - :param diff_tool_timeout: timeout for running diff tool + :param diff_tool_timeout: timeout for running diff tool :return: object that can be canonized """ command = [runtime.source_path(script_path)] + _prepare_args(args) @@ -139,8 +139,8 @@ def canonical_py_execute( del execute_args["save_locally"] del execute_args["diff_tool"] del execute_args["diff_file_name"] - del execute_args["diff_tool_timeout"] - return _canonical_execute(process.py_execute, execute_args, file_name, save_locally, diff_tool, diff_file_name, diff_tool_timeout) + del execute_args["diff_tool_timeout"] + return _canonical_execute(process.py_execute, execute_args, file_name, save_locally, diff_tool, diff_file_name, diff_tool_timeout) def _prepare_args(args): @@ -151,7 +151,7 @@ def _prepare_args(args): return args -def _canonical_execute(excutor, kwargs, file_name, save_locally, diff_tool, diff_file_name, diff_tool_timeout): +def _canonical_execute(excutor, kwargs, file_name, save_locally, diff_tool, diff_file_name, diff_tool_timeout): res = excutor(**kwargs) command = kwargs["command"] file_name = file_name or process.get_command_name(command) @@ -173,4 +173,4 @@ def _canonical_execute(excutor, kwargs, file_name, save_locally, diff_tool, diff with open(err_file_path, "wb") as err_file: err_file.write(res.std_err) - return canonical_file(out_file_path, local=save_locally, diff_tool=diff_tool, diff_file_name=diff_file_name, diff_tool_timeout=diff_tool_timeout) + return canonical_file(out_file_path, local=save_locally, diff_tool=diff_tool, diff_file_name=diff_file_name, diff_tool_timeout=diff_tool_timeout) diff --git a/library/python/testing/yatest_common/yatest/common/network.py b/library/python/testing/yatest_common/yatest/common/network.py index 37bcb1b8e0..67909e3a65 100644 --- a/library/python/testing/yatest_common/yatest/common/network.py +++ b/library/python/testing/yatest_common/yatest/common/network.py @@ -232,7 +232,7 @@ def get_ephemeral_range(): filename = "/proc/sys/net/ipv4/ip_local_port_range" if os.path.exists(filename): with open(filename) as afile: - data = afile.read(1024) # fix for musl + data = afile.read(1024) # fix for musl port_range = tuple(map(int, data.strip().split())) if len(port_range) == 2: return port_range |