[pypy-commit] pypy py3k: we need a BytesIO for marshal. Also, fix syntax about longs
antocuni
noreply at buildbot.pypy.org
Tue Feb 28 18:44:43 CET 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r52993:31b0c375cc6e
Date: 2012-02-28 18:11 +0100
http://bitbucket.org/pypy/pypy/changeset/31b0c375cc6e/
Log: we need a BytesIO for marshal. Also, fix syntax about longs
diff --git a/pypy/module/marshal/test/test_marshal.py b/pypy/module/marshal/test/test_marshal.py
--- a/pypy/module/marshal/test/test_marshal.py
+++ b/pypy/module/marshal/test/test_marshal.py
@@ -8,12 +8,12 @@
def w_marshal_check(self, case):
import marshal
- from io import StringIO
+ from io import BytesIO
s = marshal.dumps(case)
print(repr(s))
x = marshal.loads(s)
assert x == case and type(x) is type(case)
- f = StringIO()
+ f = BytesIO()
marshal.dump(case, f)
f.seek(0)
x = marshal.load(f)
@@ -70,8 +70,7 @@
self.marshal_check(case)
def test_long(self):
- self.marshal_check(42L)
- case = -1234567890123456789012345678901234567890L
+ case = -1234567890123456789012345678901234567890
self.marshal_check(case)
def test_hello_____not_interned(self):
More information about the pypy-commit
mailing list