Author: Ronan Lamy <ronan.l...@gmail.com> Branch: py3.6 Changeset: r97812:acd72480cb0e Date: 2019-10-18 18:02 +0100 http://bitbucket.org/pypy/pypy/changeset/acd72480cb0e/
Log: Fix test diff --git a/pypy/interpreter/test/test_gateway.py b/pypy/interpreter/test/test_gateway.py --- a/pypy/interpreter/test/test_gateway.py +++ b/pypy/interpreter/test/test_gateway.py @@ -510,7 +510,7 @@ app_f = gateway.interp2app_temp(f, unwrap_spec=['fsencode']) w_app_f = space.wrap(app_f) if sys.platform == 'win32': - raises(gateway.OperationError, space.call_function, + raises(gateway.OperationError, space.call_function, w_app_f, w(u'\udc80')) else: assert space.eq_w( @@ -1159,24 +1159,16 @@ dict.update(d, **{clash: 33}) - class AppTestFastPathCrash(object): - def setup_class(cls): - cls.w_runappdirect = cls.space.wrap(cls.runappdirect) - def test_fast_path_crash(self): # issue bb-3091 crash in BuiltinCodePassThroughArguments0.funcrun + import sys + if '__pypy__' in sys.modules: + msg_fmt = "'%s' object expected, got '%s'" + else: + msg_fmt = "'%s' object but received a '%s'" for obj in (dict, set): with raises(TypeError) as excinfo: - if self.runappdirect: - import platform - if platform.python_implementation() == 'PyPy': - msg_fmt = "%s instance as first argument (got %s" - else: - msg_fmt = "'%s' object but received a '%s'" - obj.__init__(0) - else: - msg_fmt = "'%s' object expected, got '%s'" - obj.__init__.im_func(0) - msg = msg_fmt %(obj.__name__, 'int') + obj.__init__(0) + msg = msg_fmt % (obj.__name__, 'int') assert msg in str(excinfo.value) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit