Author: Ronan Lamy <ronan.l...@gmail.com> Branch: _py3k-cpyext-A Changeset: r87013:1d896b40d4f1 Date: 2016-09-12 00:20 +0100 http://bitbucket.org/pypy/pypy/changeset/1d896b40d4f1/
Log: hack around to get -A tests to run diff --git a/pypy/module/cpyext/test/conftest.py b/pypy/module/cpyext/test/conftest.py --- a/pypy/module/cpyext/test/conftest.py +++ b/pypy/module/cpyext/test/conftest.py @@ -11,8 +11,6 @@ space.getbuiltinmodule("time") def pytest_ignore_collect(path, config): - if config.option.runappdirect: - return True # "cannot be run by py.test -A" # ensure additional functions are registered import pypy.module.cpyext.test.test_cpyext return False diff --git a/pypy/module/cpyext/test/test_cpyext.py b/pypy/module/cpyext/test/test_cpyext.py --- a/pypy/module/cpyext/test/test_cpyext.py +++ b/pypy/module/cpyext/test/test_cpyext.py @@ -327,6 +327,10 @@ #state.non_heaptypes_w[:] = [] if not cls.runappdirect: cls.w_runappdirect = space.wrap(cls.runappdirect) + else: + def w_compile_module(self, name, source_files=None, source_strings=None): + return self.sys_info(name, source_files, source_strings) + cls.w_compile_module = w_compile_module def record_imported_module(self, name): """ @@ -463,7 +467,7 @@ def wrap(func): return func self.sys_info = get_sys_info_app() - self.compile_module = self.sys_info.compile_extension_module + #self.compile_module = self.sys_info.compile_extension_module else: interp2app = gateway.interp2app wrap = self.space.wrap @@ -614,9 +618,9 @@ """ # Build the extensions. banana = self.compile_module( - "apple.banana", source_files=[self.here + 'banana.c']) + "apple.banana", source_files=[self.here + b'banana.c']) date = self.compile_module( - "cherry.date", source_files=[self.here + 'date.c']) + "cherry.date", source_files=[self.here + b'date.c']) # Set up some package state so that the extensions can actually be # imported. diff --git a/pypy/tool/pytest/apptest.py b/pypy/tool/pytest/apptest.py --- a/pypy/tool/pytest/apptest.py +++ b/pypy/tool/pytest/apptest.py @@ -121,6 +121,7 @@ elif isinstance(value, types.MethodType): # "def w_method(self)" code = py.code.Code(value) + #import pdb; pdb.set_trace() defs.append(str(code.source())) defs.append("type(self).%s = %s\n" % (symbol, value.__name__)) elif isinstance(value, types.ModuleType): @@ -149,7 +150,7 @@ missing.remove(name) del name if missing: - sys.exit(81) + pass #sys.exit(81) del missing""" % usemodules source = list(py.code.Source(target_)) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit