[pypy-svn] r65897 - in pypy/branch/pyjitpl5/pypy/rlib: rstruct test
fijal at codespeak.net
fijal at codespeak.net
Wed Jun 24 00:06:29 CEST 2009
Author: fijal
Date: Wed Jun 24 00:06:28 2009
New Revision: 65897
Modified:
pypy/branch/pyjitpl5/pypy/rlib/rstruct/runpack.py
pypy/branch/pyjitpl5/pypy/rlib/test/test_rstruct.py
Log:
I *guess* this is the fix, although it does not have that many tests
Modified: pypy/branch/pyjitpl5/pypy/rlib/rstruct/runpack.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/rlib/rstruct/runpack.py (original)
+++ pypy/branch/pyjitpl5/pypy/rlib/rstruct/runpack.py Wed Jun 24 00:06:28 2009
@@ -56,8 +56,9 @@
self.formats.append((fmtdesc, 1, None))
def align(self, mask):
- fmt, rep, _ = self.formats.pop()
- self.formats.append((fmt, rep, mask))
+ if self.formats:
+ fmt, rep, _ = self.formats.pop()
+ self.formats.append((fmt, rep, mask))
def _create_unpacking_func(self):
rg = range(len(self.formats))
Modified: pypy/branch/pyjitpl5/pypy/rlib/test/test_rstruct.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/rlib/test/test_rstruct.py (original)
+++ pypy/branch/pyjitpl5/pypy/rlib/test/test_rstruct.py Wed Jun 24 00:06:28 2009
@@ -11,7 +11,6 @@
assert self.interpret(fn, []) == 3
def test_unpack_2(self):
- py.test.skip("Fails")
data = struct.pack('iiii', 0, 1, 2, 4)
def fn():
More information about the Pypy-commit
mailing list