[pypy-commit] pypy testing-cleanup: fix test__vmprof.py
rlamy
pypy.commits at gmail.com
Tue Jun 7 14:36:37 EDT 2016
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: testing-cleanup
Changeset: r85007:9814e558d693
Date: 2016-06-07 19:14 +0100
http://bitbucket.org/pypy/pypy/changeset/9814e558d693/
Log: fix test__vmprof.py
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
@@ -3,8 +3,9 @@
from pypy.tool.pytest.objspace import gettestobjspace
class AppTestVMProf(object):
+ spaceconfig = {'usemodules': ['_vmprof', 'struct']}
+
def setup_class(cls):
- cls.space = gettestobjspace(usemodules=['_vmprof', 'struct'])
cls.w_tmpfilename = cls.space.wrap(str(udir.join('test__vmprof.1')))
cls.w_tmpfilename2 = cls.space.wrap(str(udir.join('test__vmprof.2')))
@@ -17,7 +18,7 @@
import struct, sys, gc
WORD = struct.calcsize('l')
-
+
def count(s):
i = 0
count = 0
@@ -44,7 +45,7 @@
else:
raise AssertionError(ord(s[i]))
return count
-
+
import _vmprof
gc.collect() # try to make the weakref list deterministic
gc.collect() # by freeing all dead code objects
More information about the pypy-commit
mailing list