Author: Philip Jenvey <pjen...@underboss.org> Branch: py3k Changeset: r71290:96a00ddec0cd Date: 2014-05-05 13:01 -0700 http://bitbucket.org/pypy/pypy/changeset/96a00ddec0cd/
Log: adapt tests from default 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 @@ -196,7 +196,7 @@ def test_bad_typecode(self): import marshal - exc = raises(ValueError, marshal.loads, chr(1)) + exc = raises(ValueError, marshal.loads, bytes([1])) assert str(exc.value) == "bad marshal data (unknown type code)" def test_bad_data(self): diff --git a/pypy/module/mmap/test/test_mmap.py b/pypy/module/mmap/test/test_mmap.py --- a/pypy/module/mmap/test/test_mmap.py +++ b/pypy/module/mmap/test/test_mmap.py @@ -528,7 +528,7 @@ f.close() - def test_buffer(self): + def test_memoryview(self): from mmap import mmap f = open(self.tmpname + "y", "bw+") f.write(b"foobar") @@ -542,18 +542,6 @@ m.close() f.close() - def test_memoryview(self): - from mmap import mmap - f = open(self.tmpname + "y", "w+") - f.write("foobar") - f.flush() - m = mmap(f.fileno(), 6) - m[5] = '?' - exc = raises(TypeError, memoryview, m) - assert 'buffer interface' in str(exc.value) - m.close() - f.close() - def test_offset(self): from mmap import mmap, ALLOCATIONGRANULARITY f = open(self.tmpname + "y", "wb+") _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit