Author: Richard Plangger <[email protected]>
Branch: s390x-backend
Changeset: r81907:359e329036d5
Date: 2016-01-22 09:59 +0100
http://bitbucket.org/pypy/pypy/changeset/359e329036d5/
Log: endian test issue marshal, test decoded value using platform
endianess (not desired for marshall module)
diff --git a/pypy/module/marshal/test/test_marshalimpl.py
b/pypy/module/marshal/test/test_marshalimpl.py
--- a/pypy/module/marshal/test/test_marshalimpl.py
+++ b/pypy/module/marshal/test/test_marshalimpl.py
@@ -64,14 +64,17 @@
import marshal, struct
class FakeM:
+ # NOTE: marshal is platform independent, running this test must assume
+ # that seen gets values from the endianess of the marshal module.
+ # (which is little endian!)
def __init__(self):
self.seen = []
def start(self, code):
self.seen.append(code)
def put_int(self, value):
- self.seen.append(struct.pack("i", value))
+ self.seen.append(struct.pack("<i", value))
def put_short(self, value):
- self.seen.append(struct.pack("h", value))
+ self.seen.append(struct.pack("<h", value))
def _marshal_check(x):
expected = marshal.dumps(long(x))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit