Author: Manuel Jacob <m...@manueljacob.de>
Branch: py3.3
Changeset: r82583:01bf93ab834d
Date: 2016-02-27 01:38 +0100
http://bitbucket.org/pypy/pypy/changeset/01bf93ab834d/

Log:    hg merge py3k

diff --git a/pypy/module/_vmprof/test/test__vmprof.py 
b/pypy/module/_vmprof/test/test__vmprof.py
--- a/pypy/module/_vmprof/test/test__vmprof.py
+++ b/pypy/module/_vmprof/test/test__vmprof.py
@@ -5,14 +5,15 @@
 class AppTestVMProf(object):
     def setup_class(cls):
         cls.space = gettestobjspace(usemodules=['_vmprof', 'struct'])
-        cls.tmpfile = udir.join('test__vmprof.1').open('wb')
-        cls.w_tmpfileno = cls.space.wrap(cls.tmpfile.fileno())
-        cls.w_tmpfilename = cls.space.wrap(cls.tmpfile.name)
-        cls.tmpfile2 = udir.join('test__vmprof.2').open('wb')
-        cls.w_tmpfileno2 = cls.space.wrap(cls.tmpfile2.fileno())
-        cls.w_tmpfilename2 = cls.space.wrap(cls.tmpfile2.name)
+        cls.w_tmpfilename = cls.space.wrap(str(udir.join('test__vmprof.1')))
+        cls.w_tmpfilename2 = cls.space.wrap(str(udir.join('test__vmprof.2')))
 
     def test_import_vmprof(self):
+        tmpfile = open(self.tmpfilename, 'wb')
+        tmpfileno = tmpfile.fileno()
+        tmpfile2 = open(self.tmpfilename2, 'wb')
+        tmpfileno2 = tmpfile2.fileno()
+
         import struct, sys
 
         WORD = struct.calcsize('l')
@@ -45,7 +46,7 @@
             return count
         
         import _vmprof
-        _vmprof.enable(self.tmpfileno, 0.01)
+        _vmprof.enable(tmpfileno, 0.01)
         _vmprof.disable()
         s = open(self.tmpfilename, 'rb').read()
         no_of_codes = count(s)
@@ -59,7 +60,7 @@
             pass
         """, d)
 
-        _vmprof.enable(self.tmpfileno2, 0.01)
+        _vmprof.enable(tmpfileno2, 0.01)
 
         exec_("""def foo2():
             pass
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
@@ -200,6 +200,12 @@
         assert str(exc.value) == "bad marshal data (unknown type code)"
 
     def test_bad_data(self):
+        # If you have sufficiently little memory, the line at the end of the
+        # test will fail immediately.  If not, the test will consume high
+        # amounts of memory and make your system unstable.  CPython (I tried
+        # 3.3 and 3.5) shows the same behaviour on my computers (4 GB and 12 
GB).
+        skip("takes too much memory")
+
         import marshal
         # Yes, there is code that depends on this :-(
         raises(EOFError, marshal.loads, b'<test>')
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to