Author: Richard Plangger <planri...@gmail.com> Branch: Changeset: r85868:4afa4a9d8caf Date: 2016-07-26 12:44 +0200 http://bitbucket.org/pypy/pypy/changeset/4afa4a9d8caf/
Log: adapt test to check for the new header diff --git a/pypy/module/_jitlog/test/test__jitlog.py b/pypy/module/_jitlog/test/test__jitlog.py --- a/pypy/module/_jitlog/test/test__jitlog.py +++ b/pypy/module/_jitlog/test/test__jitlog.py @@ -1,4 +1,5 @@ +import sys from rpython.tool.udir import udir from pypy.tool.pytest.objspace import gettestobjspace from rpython.rlib.rjitlog import rjitlog as jl @@ -10,6 +11,7 @@ cls.w_tmpfilename = cls.space.wrap(str(udir.join('test__jitlog.1'))) cls.w_mark_header = cls.space.wrap(jl.MARK_JITLOG_HEADER) cls.w_version = cls.space.wrap(jl.JITLOG_VERSION_16BIT_LE) + cls.w_is_32bit = cls.space.wrap(sys.maxint == 2**31-1) def test_enable(self): import _jitlog, struct @@ -22,6 +24,7 @@ with open(self.tmpfilename, 'rb') as fd: assert fd.read(1) == self.mark_header assert fd.read(2) == self.version + assert bool(ord(fd.read(1))) == self.is_32bit count, = struct.unpack('<h', fd.read(2)) for i in range(count): opnum = struct.unpack('<h', fd.read(2)) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit