diff options
author | iaz1607 <iaz1607@yandex-team.com> | 2023-11-27 13:50:15 +0300 |
---|---|---|
committer | iaz1607 <iaz1607@yandex-team.com> | 2023-11-27 14:20:03 +0300 |
commit | f2bebe45e16d892b620cc073279faaa1bf550a92 (patch) | |
tree | f8b87603f9c7f8372a7e4d49b352e1ab1b8fc61f /build/plugins/ytest.py | |
parent | 9b07404a4c0075cda0fcf2ee078cf81c51c05fd2 (diff) | |
download | ydb-f2bebe45e16d892b620cc073279faaa1bf550a92.tar.gz |
`build/plugins` ya style --py
Diffstat (limited to 'build/plugins/ytest.py')
-rw-r--r-- | build/plugins/ytest.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py index 6f2cea5bec..edf060c8ae 100644 --- a/build/plugins/ytest.py +++ b/build/plugins/ytest.py @@ -11,6 +11,7 @@ import shlex import _common import lib.test_const as consts import _requirements as reqs + try: from StringIO import StringIO except ImportError: @@ -151,7 +152,9 @@ def validate_test(unit, kw): if tag.startswith('sb:'): sb_tags.append(tag) elif ':' in tag and not tag.startswith('ya:') and tag.split(':')[0] not in skip_set: - errors.append("Only [[imp]]sb:[[rst]] and [[imp]]ya:[[rst]] prefixes are allowed in system tags: {}".format(tag)) + errors.append( + "Only [[imp]]sb:[[rst]] and [[imp]]ya:[[rst]] prefixes are allowed in system tags: {}".format(tag) + ) if is_fat: if size != consts.TestSize.Large: @@ -450,7 +453,14 @@ def onadd_ytest(unit, *args): } flat_args, spec_args = _common.sort_by_keywords(keywords, args) - is_implicit_data_needed = flat_args[1] in ("unittest.py", "gunittest", "g_benchmark", "go.test", "boost.test", "fuzz.test") + is_implicit_data_needed = flat_args[1] in ( + "unittest.py", + "gunittest", + "g_benchmark", + "go.test", + "boost.test", + "fuzz.test", + ) if is_implicit_data_needed and unit.get('ADD_SRCDIR_TO_TEST_DATA') == "yes": unit.ondata_files(_common.get_norm_unit_path(unit)) @@ -641,10 +651,10 @@ def onadd_check(unit, *args): fork_mode = unit.get('TEST_FORK_MODE') or '' elif check_type == "ktlint": test_timeout = '120' - ktlint_binary = '$(KTLINT_OLD)/run.bat' if unit.get('_USE_KTLINT_OLD') == 'yes' else '$(KTLINT)/run.bat' + ktlint_binary = '$(KTLINT_OLD)/run.bat' if unit.get('_USE_KTLINT_OLD') == 'yes' else '$(KTLINT)/run.bat' extra_test_dart_data['KTLINT_BINARY'] = ktlint_binary elif check_type == "JAVA_STYLE": - if ymake_java_test and not unit.get('ALL_SRCDIRS') or '': + if ymake_java_test and not unit.get('ALL_SRCDIRS'): return if len(flat_args) < 2: raise Exception("Not enough arguments for JAVA_STYLE check") @@ -1084,7 +1094,6 @@ def _dump_test( yt_spec=None, data_files=None, ): - if test_type == "PY_TEST": script_rel_path = "py.test" else: |