summaryrefslogtreecommitdiffstats
path: root/library/python/testing/yatest_common
diff options
context:
space:
mode:
authorprettyboy <[email protected]>2023-09-22 01:24:48 +0300
committerprettyboy <[email protected]>2023-09-22 01:53:30 +0300
commit2848d0b609b460524bfefbdad19508dc120de001 (patch)
treebe27b646e48474b6f449426fbdbcc14f05104fdf /library/python/testing/yatest_common
parent275bbb28224e7dae22959f79299b7ee348098f89 (diff)
[library/python] Fix some style tests
см https://a.yandex-team.ru/review/4511498/details?checkId=29700000007055&dialogId=CiCard&filter=resultType%28RT_STYLE_CHECK%29%3BsuiteCategory%28CATEGORY_CHANGED%29&iterationType=FULL&number=1&openedItems=955241967903872625%3ART_STYLE_SUITE_CHECK%2C12143061788616128922%3ART_STYLE_SUITE_CHECK%2C8023375544570871616%3ART_STYLE_SUITE_CHECK%2C10700057700434354061%3ART_STYLE_SUITE_CHECK%2C10919096887128703016%3ART_STYLE_SUITE_CHECK%2C8720280302786645361%3ART_STYLE_SUITE_CHECK%2C16643406941049220442%3ART_STYLE_SUITE_CHECK%2C12501056625690179524%3ART_STYLE_SUITE_CHECK&snippetViewMode=word-wrap&status=STATUS_FAILED
Diffstat (limited to 'library/python/testing/yatest_common')
-rw-r--r--library/python/testing/yatest_common/yatest/common/canonical.py6
-rw-r--r--library/python/testing/yatest_common/yatest/common/process.py5
2 files changed, 8 insertions, 3 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/canonical.py b/library/python/testing/yatest_common/yatest/common/canonical.py
index 0bce0fde7a5..c964b076cc0 100644
--- a/library/python/testing/yatest_common/yatest/common/canonical.py
+++ b/library/python/testing/yatest_common/yatest/common/canonical.py
@@ -46,7 +46,7 @@ def canonical_file(
try: # check if iterable
if not isinstance(diff_tool[0], six.string_types):
raise Exception("Invalid custom diff-tool: not cmd")
- except:
+ except Exception:
raise Exception("Invalid custom diff-tool: not binary path")
return runtime._get_ya_plugin_instance().file(
safe_path, diff_tool=diff_tool, local=local, diff_file_name=diff_file_name, diff_tool_timeout=diff_tool_timeout
@@ -217,7 +217,9 @@ def _canonical_execute(
out_file_path = path.get_unique_file_path(runtime.output_path(), "{}.out.txt".format(file_name))
err_file_path = path.get_unique_file_path(runtime.output_path(), "{}.err.txt".format(file_name))
if not data_transformer:
- data_transformer = lambda x: x
+
+ def data_transformer(x):
+ return x
try:
os.makedirs(os.path.dirname(out_file_path))
diff --git a/library/python/testing/yatest_common/yatest/common/process.py b/library/python/testing/yatest_common/yatest/common/process.py
index c6c8aed5268..69988be84c5 100644
--- a/library/python/testing/yatest_common/yatest/common/process.py
+++ b/library/python/testing/yatest_common/yatest/common/process.py
@@ -373,7 +373,10 @@ class _Execution(object):
try:
if timeout:
- process_is_finished = lambda: not self.running
+
+ def process_is_finished():
+ return not self.running
+
fail_message = "Command '%s' stopped by %d seconds timeout" % (self._command, timeout)
try:
wait_for(