Author: Armin Rigo <>
Branch: py3.5
Changeset: r88803:a59665c98dd5
Date: 2016-12-01 17:59 +0100

Log:    fix this test: it has two 'mistakes' per line and happens to test
        that CPython reports a specific one of them before the other,
        whereas PyPy reports them in opposite order so far. This was
        probably not intended.

diff --git a/lib-python/3/test/ b/lib-python/3/test/
--- a/lib-python/3/test/
+++ b/lib-python/3/test/
@@ -547,19 +547,19 @@
         self.assertRaises(struct.error, struct.unpack_from, '12345', store, 0)
         # Format lists with trailing count spec should result in an error
-        self.assertRaises(struct.error, struct.pack, 'c12345', 'x')
-        self.assertRaises(struct.error, struct.unpack, 'c12345', 'x')
+        self.assertRaises(struct.error, struct.pack, 'c12345', b'x')
+        self.assertRaises(struct.error, struct.unpack, 'c12345', b'x')
         self.assertRaises(struct.error, struct.pack_into, 'c12345', store, 0,
-                           'x')
+                           b'x')
         self.assertRaises(struct.error, struct.unpack_from, 'c12345', store,
         # Mixed format tests
-        self.assertRaises(struct.error, struct.pack, '14s42', 'spam and eggs')
+        self.assertRaises(struct.error, struct.pack, '14s42', b'spam and eggs')
         self.assertRaises(struct.error, struct.unpack, '14s42',
-                          'spam and eggs')
+                          b'spam and eggs')
         self.assertRaises(struct.error, struct.pack_into, '14s42', store, 0,
-                          'spam and eggs')
+                          b'spam and eggs')
         self.assertRaises(struct.error, struct.unpack_from, '14s42', store, 0)
     def test_Struct_reinitialization(self):
pypy-commit mailing list

Reply via email to