aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/cython/Cython/Debugger/Tests/TestLibCython.py
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/tools/cython/Cython/Debugger/Tests/TestLibCython.py
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
downloadydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Debugger/Tests/TestLibCython.py')
-rw-r--r--contrib/tools/cython/Cython/Debugger/Tests/TestLibCython.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/contrib/tools/cython/Cython/Debugger/Tests/TestLibCython.py b/contrib/tools/cython/Cython/Debugger/Tests/TestLibCython.py
index a23d31f534..13560646ff 100644
--- a/contrib/tools/cython/Cython/Debugger/Tests/TestLibCython.py
+++ b/contrib/tools/cython/Cython/Debugger/Tests/TestLibCython.py
@@ -14,7 +14,7 @@ from distutils import ccompiler
import runtests
import Cython.Distutils.extension
-import Cython.Distutils.old_build_ext as build_ext
+import Cython.Distutils.old_build_ext as build_ext
from Cython.Debugger import Cygdb as cygdb
root = os.path.dirname(os.path.abspath(__file__))
@@ -31,38 +31,38 @@ def test_gdb():
if have_gdb is not None:
return have_gdb
- have_gdb = False
+ have_gdb = False
try:
- p = subprocess.Popen(['gdb', '-nx', '--version'], stdout=subprocess.PIPE)
+ p = subprocess.Popen(['gdb', '-nx', '--version'], stdout=subprocess.PIPE)
except OSError:
- # gdb not found
- gdb_version = None
+ # gdb not found
+ gdb_version = None
else:
- stdout, _ = p.communicate()
+ stdout, _ = p.communicate()
# Based on Lib/test/test_gdb.py
- regex = r"GNU gdb [^\d]*(\d+)\.(\d+)"
- gdb_version = re.match(regex, stdout.decode('ascii', 'ignore'))
+ regex = r"GNU gdb [^\d]*(\d+)\.(\d+)"
+ gdb_version = re.match(regex, stdout.decode('ascii', 'ignore'))
- if gdb_version:
- gdb_version_number = list(map(int, gdb_version.groups()))
+ if gdb_version:
+ gdb_version_number = list(map(int, gdb_version.groups()))
if gdb_version_number >= [7, 2]:
- have_gdb = True
- with tempfile.NamedTemporaryFile(mode='w+') as python_version_script:
+ have_gdb = True
+ with tempfile.NamedTemporaryFile(mode='w+') as python_version_script:
python_version_script.write(
'python import sys; print("%s %s" % sys.version_info[:2])')
python_version_script.flush()
p = subprocess.Popen(['gdb', '-batch', '-x', python_version_script.name],
stdout=subprocess.PIPE)
- stdout, _ = p.communicate()
+ stdout, _ = p.communicate()
try:
- internal_python_version = list(map(int, stdout.decode('ascii', 'ignore').split()))
- if internal_python_version < [2, 6]:
- have_gdb = False
+ internal_python_version = list(map(int, stdout.decode('ascii', 'ignore').split()))
+ if internal_python_version < [2, 6]:
+ have_gdb = False
except ValueError:
have_gdb = False
- if not have_gdb:
- warnings.warn('Skipping gdb tests, need gdb >= 7.2 with Python >= 2.6')
+ if not have_gdb:
+ warnings.warn('Skipping gdb tests, need gdb >= 7.2 with Python >= 2.6')
return have_gdb