Author: Ronan Lamy <ronan.l...@gmail.com> Branch: py3.5 Changeset: r93431:6f435c55a176 Date: 2017-12-16 01:48 +0000 http://bitbucket.org/pypy/pypy/changeset/6f435c55a176/
Log: None of these checks make sense for pypy3 diff --git a/pypy/tool/pytest/objspace.py b/pypy/tool/pytest/objspace.py --- a/pypy/tool/pytest/objspace.py +++ b/pypy/tool/pytest/objspace.py @@ -15,12 +15,12 @@ # this exception is typically only raised if a module is not available. # in this case the test should be skipped py.test.skip(str(e)) + if getattr(option, 'runappdirect', None): + return TinyObjSpace() key = config.getkey() try: return _SPACECACHE[key] except KeyError: - if getattr(option, 'runappdirect', None): - return TinyObjSpace(**kwds) space = maketestobjspace(config) _SPACECACHE[key] = space return space @@ -46,28 +46,7 @@ class TinyObjSpace(object): """An object space that delegates everything to the hosting Python.""" - def __init__(self, **kwds): - info = getattr(sys, 'pypy_translation_info', None) - for key, value in kwds.iteritems(): - if key == 'usemodules': - if info is not None: - for modname in value: - ok = info.get('objspace.usemodules.%s' % modname, - False) - if not ok: - py.test.skip("cannot runappdirect test: " - "module %r required" % (modname,)) - continue - if info is None: - py.test.skip("cannot runappdirect this test on top of CPython") - if ('translation.' + key) in info: - key = 'translation.' + key - has = info.get(key, None) - if has != value: - #print sys.pypy_translation_info - py.test.skip("cannot runappdirect test: space needs %s = %s, "\ - "while pypy3-c was built with %s" % (key, value, has)) - + def __init__(self): for name in ('int', 'long', 'str', 'unicode', 'list', 'None', 'ValueError', 'OverflowError'): setattr(self, 'w_' + name, eval(name)) @@ -93,9 +72,6 @@ return list(self.wrap(item) for item in obj) return obj - def newbytes(self, obj): - return obj - def unpackiterable(self, itr): return list(itr) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit