diff options
author | deshevoy <deshevoy@yandex-team.ru> | 2022-02-10 16:46:57 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:57 +0300 |
commit | 28148f76dbfcc644d96427d41c92f36cbf2fdc6e (patch) | |
tree | b83306b6e37edeea782e9eed673d89286c4fef35 /library/python/testing | |
parent | e988f30484abe5fdeedcc7a5d3c226c01a21800c (diff) | |
download | ydb-28148f76dbfcc644d96427d41c92f36cbf2fdc6e.tar.gz |
Restoring authorship annotation for <deshevoy@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/python/testing')
-rw-r--r-- | library/python/testing/yatest_common/yatest/common/process.py | 16 | ||||
-rw-r--r-- | library/python/testing/yatest_lib/external.py | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/process.py b/library/python/testing/yatest_common/yatest/common/process.py index d4618d59fb..a8bcc21f51 100644 --- a/library/python/testing/yatest_common/yatest/common/process.py +++ b/library/python/testing/yatest_common/yatest/common/process.py @@ -9,7 +9,7 @@ import logging import tempfile import subprocess import errno -import distutils.version +import distutils.version import six @@ -27,7 +27,7 @@ from . import environment MAX_OUT_LEN = 1000 * 1000 # 1 mb MAX_MESSAGE_LEN = 1500 SANITIZER_ERROR_PATTERN = br": ([A-Z][\w]+Sanitizer)" -GLIBC_PATTERN = re.compile(r"\S+@GLIBC_([0-9.]+)") +GLIBC_PATTERN = re.compile(r"\S+@GLIBC_([0-9.]+)") yatest_logger = logging.getLogger("ya.test") @@ -696,13 +696,13 @@ def _run_readelf(binary_path): def check_glibc_version(binary_path): - lucid_glibc_version = distutils.version.LooseVersion("2.11") - + lucid_glibc_version = distutils.version.LooseVersion("2.11") + for l in _run_readelf(binary_path).split('\n'): - match = GLIBC_PATTERN.search(l) - if not match: - continue - assert distutils.version.LooseVersion(match.group(1)) <= lucid_glibc_version, match.group(0) + match = GLIBC_PATTERN.search(l) + if not match: + continue + assert distutils.version.LooseVersion(match.group(1)) <= lucid_glibc_version, match.group(0) def backtrace_to_html(bt_filename, output): diff --git a/library/python/testing/yatest_lib/external.py b/library/python/testing/yatest_lib/external.py index 699ba4449c..39113230d9 100644 --- a/library/python/testing/yatest_lib/external.py +++ b/library/python/testing/yatest_lib/external.py @@ -15,7 +15,7 @@ logger = logging.getLogger(__name__) MDS_URI_PREFIX = 'https://storage.yandex-team.ru/get-devtools/' -def apply(func, value, apply_to_keys=False): +def apply(func, value, apply_to_keys=False): """ Applies func to every possible member of value :param value: could be either a primitive object or a complex one (list, dicts) @@ -41,7 +41,7 @@ def apply(func, value, apply_to_keys=False): for key, val in sorted(value.items(), key=lambda dict_item: dict_item[0]): path = copy.copy(value_path) path.append(key) - res[_apply(func, key, path) if apply_to_keys else key] = _apply(func, val, path) + res[_apply(func, key, path) if apply_to_keys else key] = _apply(func, val, path) else: res = func(value, value_path) return res @@ -78,7 +78,7 @@ def serialize(value): if is_coroutine(val): return None raise ValueError("Cannot serialize value '{}' of type {}".format(val, type(val))) - return apply(_serialize, value, apply_to_keys=True) + return apply(_serialize, value, apply_to_keys=True) def is_external(value): @@ -89,7 +89,7 @@ class ExternalSchema(object): File = "file" SandboxResource = "sbr" Delayed = "delayed" - HTTP = "http" + HTTP = "http" class CanonicalObject(dict): @@ -131,10 +131,10 @@ class ExternalDataInfo(object): return self.uri.startswith(ExternalSchema.Delayed) @property - def is_http(self): - return self.uri.startswith(ExternalSchema.HTTP) - - @property + def is_http(self): + return self.uri.startswith(ExternalSchema.HTTP) + + @property def path(self): if self.uri.count("://") != 1: logger.error("Invalid external data uri: '%s'", self.uri) |