diff options
author | Aleksandr <ivansduck@gmail.com> | 2022-02-10 16:47:52 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:52 +0300 |
commit | b05913d1c3c02a773578bceb7285084d2933ae86 (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /contrib/tools/cython/Cython/Debugger/Tests | |
parent | ea6c5b7f172becca389cacaff7d5f45f6adccbe6 (diff) | |
download | ydb-b05913d1c3c02a773578bceb7285084d2933ae86.tar.gz |
Restoring authorship annotation for Aleksandr <ivansduck@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Debugger/Tests')
5 files changed, 21 insertions, 21 deletions
diff --git a/contrib/tools/cython/Cython/Debugger/Tests/TestLibCython.py b/contrib/tools/cython/Cython/Debugger/Tests/TestLibCython.py index be9eebf81f..13560646ff 100644 --- a/contrib/tools/cython/Cython/Debugger/Tests/TestLibCython.py +++ b/contrib/tools/cython/Cython/Debugger/Tests/TestLibCython.py @@ -90,8 +90,8 @@ class DebuggerTestCase(unittest.TestCase): shutil.copy(codefile, self.destfile) shutil.copy(cfuncs_file, self.cfuncs_destfile + '.c') - shutil.copy(cfuncs_file.replace('.c', '.h'), - self.cfuncs_destfile + '.h') + shutil.copy(cfuncs_file.replace('.c', '.h'), + self.cfuncs_destfile + '.h') compiler = ccompiler.new_compiler() compiler.compile(['cfuncs.c'], debug=True, extra_postargs=['-fPIC']) diff --git a/contrib/tools/cython/Cython/Debugger/Tests/cfuncs.h b/contrib/tools/cython/Cython/Debugger/Tests/cfuncs.h index 1fd59e5b02..3b21bc2d5f 100644 --- a/contrib/tools/cython/Cython/Debugger/Tests/cfuncs.h +++ b/contrib/tools/cython/Cython/Debugger/Tests/cfuncs.h @@ -1 +1 @@ -void some_c_function(void); +void some_c_function(void); diff --git a/contrib/tools/cython/Cython/Debugger/Tests/codefile b/contrib/tools/cython/Cython/Debugger/Tests/codefile index 0150d68ee3..6b4c6b6add 100644 --- a/contrib/tools/cython/Cython/Debugger/Tests/codefile +++ b/contrib/tools/cython/Cython/Debugger/Tests/codefile @@ -1,7 +1,7 @@ cdef extern from "stdio.h": int puts(char *s) -cdef extern from "cfuncs.h": +cdef extern from "cfuncs.h": void some_c_function() import os @@ -12,9 +12,9 @@ python_var = 13 def spam(a=0): cdef: int b, c - + b = c = d = 0 - + b = 1 c = 2 int(10) @@ -23,11 +23,11 @@ def spam(a=0): some_c_function() cpdef eggs(): - pass - + pass + cdef ham(): pass - + cdef class SomeClass(object): def spam(self): pass diff --git a/contrib/tools/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py b/contrib/tools/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py index e2fc724a01..bd7608d607 100644 --- a/contrib/tools/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py +++ b/contrib/tools/cython/Cython/Debugger/Tests/test_libcython_in_gdb.py @@ -19,7 +19,7 @@ import tempfile import functools import traceback import itertools -#from test import test_support +#from test import test_support import gdb @@ -39,8 +39,8 @@ def print_on_call_decorator(func): try: return func(self, *args, **kwargs) - except Exception: - _debug("An exception occurred:", traceback.format_exc()) + except Exception: + _debug("An exception occurred:", traceback.format_exc()) raise return wrapper diff --git a/contrib/tools/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py b/contrib/tools/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py index 48e75b03bd..6f34cee47b 100644 --- a/contrib/tools/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py +++ b/contrib/tools/cython/Cython/Debugger/Tests/test_libpython_in_gdb.py @@ -56,28 +56,28 @@ class TestPrettyPrinters(test_libcython_in_gdb.DebugTestCase): else: funcname = 'PyBytes_FromStringAndSize' - assert b'"' not in string + assert b'"' not in string # ensure double quotes - code = '(PyObject *) %s("%s", %d)' % (funcname, string.decode('iso8859-1'), len(string)) + code = '(PyObject *) %s("%s", %d)' % (funcname, string.decode('iso8859-1'), len(string)) return self.pyobject_fromcode(code, gdbvar=gdbvar) def alloc_unicodestring(self, string, gdbvar=None): postfix = libpython.get_inferior_unicode_postfix() - funcname = 'PyUnicode%s_DecodeUnicodeEscape' % (postfix,) + funcname = 'PyUnicode%s_DecodeUnicodeEscape' % (postfix,) - data = string.encode("unicode_escape").decode('iso8859-1') + data = string.encode("unicode_escape").decode('iso8859-1') return self.pyobject_fromcode( - '(PyObject *) %s("%s", %d, "strict")' % ( - funcname, data.replace('"', r'\"').replace('\\', r'\\'), len(data)), + '(PyObject *) %s("%s", %d, "strict")' % ( + funcname, data.replace('"', r'\"').replace('\\', r'\\'), len(data)), gdbvar=gdbvar) def test_bytestring(self): - bytestring = self.alloc_bytestring(b"spam") + bytestring = self.alloc_bytestring(b"spam") if inferior_python_version < (3, 0): bytestring_class = libpython.PyStringObjectPtr - expected = repr(b"spam") + expected = repr(b"spam") else: bytestring_class = libpython.PyBytesObjectPtr expected = "b'spam'" @@ -88,7 +88,7 @@ class TestPrettyPrinters(test_libcython_in_gdb.DebugTestCase): def test_unicode(self): unicode_string = self.alloc_unicodestring(u"spam ἄλφα") - expected = u"'spam ἄλφα'" + expected = u"'spam ἄλφα'" if inferior_python_version < (3, 0): expected = 'u' + expected |