[pypy-svn] pypy pytest2: enhance custom pypy hack for running tests without py.test in a subprocess
hpk42
commits-noreply at bitbucket.org
Wed Jan 19 19:25:07 CET 2011
Author: holger krekel <holger at merlinux.eu>
Branch: pytest2
Changeset: r40950:a09648d3a771
Date: 2011-01-19 19:24 +0100
http://bitbucket.org/pypy/pypy/changeset/a09648d3a771/
Log: enhance custom pypy hack for running tests without py.test in a
subprocess
diff --git a/pypy/jit/metainterp/test/test_memmgr.py b/pypy/jit/metainterp/test/test_memmgr.py
--- a/pypy/jit/metainterp/test/test_memmgr.py
+++ b/pypy/jit/metainterp/test/test_memmgr.py
@@ -1,8 +1,14 @@
import sys
if len(sys.argv) >= 4 and sys.argv[1] == '--sub':
sys.path[:] = eval(sys.argv[2]) # hacks for test_integration
- from pypy.conftest import option
- option.__dict__.update(eval(sys.argv[3]))
+ # XXX we don't invokve py.test machinery but try to make sure
+ # pypy support code sees the test options from the invoking
+ # process
+ import pypy.conftest
+ class opt:
+ pass
+ pypy.conftest.option = opt()
+ pypy.conftest.option.__dict__.update(eval(sys.argv[3]))
import py
from pypy.jit.metainterp.memmgr import MemoryManager
More information about the Pypy-commit
mailing list