aboutsummaryrefslogtreecommitdiffstats
path: root/build/platform/python/tests/testlib.py
diff options
context:
space:
mode:
authorAleksandr <ivansduck@gmail.com>2022-02-10 16:47:52 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:52 +0300
commitb05913d1c3c02a773578bceb7285084d2933ae86 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /build/platform/python/tests/testlib.py
parentea6c5b7f172becca389cacaff7d5f45f6adccbe6 (diff)
downloadydb-b05913d1c3c02a773578bceb7285084d2933ae86.tar.gz
Restoring authorship annotation for Aleksandr <ivansduck@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'build/platform/python/tests/testlib.py')
-rw-r--r--build/platform/python/tests/testlib.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/build/platform/python/tests/testlib.py b/build/platform/python/tests/testlib.py
index 92fc571778..d12f2815d4 100644
--- a/build/platform/python/tests/testlib.py
+++ b/build/platform/python/tests/testlib.py
@@ -1,21 +1,21 @@
-import os
-import subprocess
-
-import yatest.common
-
-
-def get_python_bin(ver):
+import os
+import subprocess
+
+import yatest.common
+
+
+def get_python_bin(ver):
res_name = 'EXTERNAL_PYTHON{}_RESOURCE_GLOBAL'.format(ver.replace('.', ''))
- gr = yatest.common.global_resources()
- if res_name in gr:
- bindir = os.path.join(gr[res_name], 'python', 'bin')
+ gr = yatest.common.global_resources()
+ if res_name in gr:
+ bindir = os.path.join(gr[res_name], 'python', 'bin')
if ('python' + ver) in os.listdir(bindir):
return os.path.join(bindir, 'python' + ver)
- return os.path.join(bindir, 'python')
-
- raise AssertionError("Resource '{}' is not available: {}".format(res_name, gr))
-
-
-def check_python_version(version):
- ver = subprocess.check_output([get_python_bin(version), '-V'], stderr=subprocess.STDOUT).decode('utf-8')
- assert version in ver
+ return os.path.join(bindir, 'python')
+
+ raise AssertionError("Resource '{}' is not available: {}".format(res_name, gr))
+
+
+def check_python_version(version):
+ ver = subprocess.check_output([get_python_bin(version), '-V'], stderr=subprocess.STDOUT).decode('utf-8')
+ assert version in ver