return
out, err = self.p.communicate()
+ err = err.decode('UTF-8')
border = '*' * 30
start = '%s v INSIDE GDB v %s' % (border, border)
end = '%s ^ INSIDE GDB ^ %s' % (border, border)
- errmsg = '\n%s\n%s%s' % (start, err.decode('UTF-8'), end)
+ errmsg = '\n%s\n%s%s' % (start, err, end)
self.assertEquals(0, self.p.wait(), errmsg)
sys.stderr.write(err)
"debugging information. Either compile python with "
"-g or get a debug build (configure with --with-pydebug).")
warnings.warn(msg)
- os._exit(1)
+ os._exit(0)
else:
m = __import__(modulename, fromlist=[''])
tests = inspect.getmembers(m, inspect.isclass)
'run.special_methods_T561_py2']),
}
+# files that should not be converted to Python 3 code with 2to3
+KEEP_2X_FILES = [
+ os.path.join('Cython', 'Debugger', 'Tests', 'test_libcython_in_gdb.py'),
+ os.path.join('Cython', 'Debugger', 'Tests', 'test_libpython_in_gdb.py'),
+ os.path.join('Cython', 'Debugger', 'libcython.py'),
+ os.path.join('Cython', 'Debugger', 'libpython.py'),
+]
+
+
INCLUDE_DIRS = [ d for d in os.getenv('INCLUDE', '').split(os.pathsep) if d ]
CFLAGS = os.getenv('CFLAGS', '').split()
recursive-exclude Cython *
recursive-include Cython *.py *.pyx *.pxd
recursive-include Cython/Debugger/Tests *
+ include runtests.py
''')
sys.path.insert(0, cy3_dir)
+ for keep_2x_file in KEEP_2X_FILES:
+ destfile = os.path.join(cy3_dir, keep_2x_file)
+ shutil.copy(keep_2x_file, destfile)
+
class PendingThreadsError(RuntimeError):
pass