[pypy-commit] pypy faster-rstruct-2: make this test endianess-independent: hopefully this fixed the failure on S390X

antocuni pypy.commits at gmail.com
Tue May 23 04:58:20 EDT 2017


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: faster-rstruct-2
Changeset: r91384:18131865f52d
Date: 2017-05-23 10:57 +0200
http://bitbucket.org/pypy/pypy/changeset/18131865f52d/

Log:	make this test endianess-independent: hopefully this fixed the
	failure on S390X

diff --git a/rpython/rlib/test/test_buffer.py b/rpython/rlib/test/test_buffer.py
--- a/rpython/rlib/test/test_buffer.py
+++ b/rpython/rlib/test/test_buffer.py
@@ -140,9 +140,10 @@
 class TestRawBufferTypedWrite(object):
 
     def test_typed_write(self):
+        expected = struct.pack('=H', 0xABCD) + '\xff'*6
         buf = MyRawBuffer('\xff' * 8, readonly=False)
         buf.typed_write(rffi.USHORT, 0, 0xABCD)
-        assert buf.as_str() == '\xcd\xab\xff\xff\xff\xff\xff\xff'
+        assert buf.as_str() == expected
         assert buf.typed_read(rffi.USHORT, 0) == 0xABCD
     
 


More information about the pypy-commit mailing list