[pypy-commit] pypy py3.5: 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.
arigo
pypy.commits at gmail.com
Thu Dec 1 16:37:38 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r88803:a59665c98dd5
Date: 2016-12-01 17:59 +0100
http://bitbucket.org/pypy/pypy/changeset/a59665c98dd5/
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/test_struct.py b/lib-python/3/test/test_struct.py
--- a/lib-python/3/test/test_struct.py
+++ b/lib-python/3/test/test_struct.py
@@ -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,
0)
# 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):
More information about the pypy-commit
mailing list