Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r58694:310116d78ea7
Date: 2012-11-02 17:11 -0700
http://bitbucket.org/pypy/pypy/changeset/310116d78ea7/
Log: rename run_with_python's args to avoid clashing with arbitrary
**definitions
diff --git a/pypy/conftest.py b/pypy/conftest.py
--- a/pypy/conftest.py
+++ b/pypy/conftest.py
@@ -206,10 +206,10 @@
if option.runappdirect:
py.test.skip("translation test, skipped for appdirect")
-def run_with_python(python, target, **definitions):
- if python is None:
+def run_with_python(python_, target_, **definitions):
+ if python_ is None:
py.test.skip("Cannot find the default python3 interpreter to run with
-A")
- # we assume that the source of target is in utf-8. Unfortunately, we don't
+ # we assume that the source of target_ is in utf-8. Unfortunately, we don't
# have any easy/standard way to determine from here the original encoding
# of the source file
helpers = r"""# -*- encoding: utf-8 -*-
@@ -248,13 +248,13 @@
defs.append(str(code))
args = ','.join(repr(arg) for arg in args)
defs.append("self.%s = anonymous(%s)\n" % (symbol, args))
- source = py.code.Source(target)[1:].deindent()
+ source = py.code.Source(target_)[1:].deindent()
pyfile = udir.join('src.py')
source = helpers + '\n'.join(defs) + str(source)
with pyfile.open('w') as f:
f.write(source)
res, stdout, stderr = runsubprocess.run_subprocess(
- python, [str(pyfile)])
+ python_, [str(pyfile)])
print source
print >> sys.stdout, stdout
print >> sys.stderr, stderr
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit