aboutsummaryrefslogtreecommitdiffstats
path: root/build/platform/python
diff options
context:
space:
mode:
authorkrock21 <krock21@yandex-team.ru>2022-02-10 16:46:02 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:02 +0300
commit4aae166b5d23fd02653919f43e2015cd636fa6fd (patch)
tree70e52225c1ede3476f358bc4699197ace987d46d /build/platform/python
parent9ab30620977aa96ae9e9da959e2f7e1370cb796d (diff)
downloadydb-4aae166b5d23fd02653919f43e2015cd636fa6fd.tar.gz
Restoring authorship annotation for <krock21@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/platform/python')
-rw-r--r--build/platform/python/tests/test_common.py26
-rw-r--r--build/platform/python/tests/testlib.py6
2 files changed, 16 insertions, 16 deletions
diff --git a/build/platform/python/tests/test_common.py b/build/platform/python/tests/test_common.py
index 7a685330ea7..ad32fe82214 100644
--- a/build/platform/python/tests/test_common.py
+++ b/build/platform/python/tests/test_common.py
@@ -4,7 +4,7 @@ import pytest
from build.platform.python.tests import testlib
-PYTHON_VERSIONS = ["2.7", "3.4", "3.5", "3.6"] # 3.7, 3.8 are not runnable
+PYTHON_VERSIONS = ["2.7", "3.4", "3.5", "3.6"] # 3.7, 3.8 are not runnable
@pytest.mark.parametrize("pyver", PYTHON_VERSIONS)
@@ -17,15 +17,15 @@ def test_python_max_unicode_bytes(pyver):
cmd = [testlib.get_python_bin(pyver), '-c', 'import sys; print(sys.maxunicode)']
maxunicode = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode('utf-8')
assert int(maxunicode) > 65535, "Found UCS2 build"
-
-
-@pytest.mark.parametrize("pyver", PYTHON_VERSIONS)
-def test_python_imports(pyver):
- imports = {
- "2.7": ['pkg_resources'],
- "3.4": [],
- "3.5": ['pkg_resources'],
- "3.6": [],
- }
- for imp in imports[pyver]:
- subprocess.check_call([testlib.get_python_bin(pyver), '-c', 'import ' + imp])
+
+
+@pytest.mark.parametrize("pyver", PYTHON_VERSIONS)
+def test_python_imports(pyver):
+ imports = {
+ "2.7": ['pkg_resources'],
+ "3.4": [],
+ "3.5": ['pkg_resources'],
+ "3.6": [],
+ }
+ for imp in imports[pyver]:
+ subprocess.check_call([testlib.get_python_bin(pyver), '-c', 'import ' + imp])
diff --git a/build/platform/python/tests/testlib.py b/build/platform/python/tests/testlib.py
index d12f2815d48..765e55aaa3a 100644
--- a/build/platform/python/tests/testlib.py
+++ b/build/platform/python/tests/testlib.py
@@ -5,12 +5,12 @@ import yatest.common
def get_python_bin(ver):
- res_name = 'EXTERNAL_PYTHON{}_RESOURCE_GLOBAL'.format(ver.replace('.', ''))
+ 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')
- if ('python' + ver) in os.listdir(bindir):
- return os.path.join(bindir, 'python' + ver)
+ 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))