Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r58285:4a4315d7af97
Date: 2012-10-20 23:13 +0200
http://bitbucket.org/pypy/pypy/changeset/4a4315d7af97/
Log: Fix for -A tests which define a "cls.w_xxx"
diff --git a/pypy/conftest.py b/pypy/conftest.py
--- a/pypy/conftest.py
+++ b/pypy/conftest.py
@@ -242,10 +242,12 @@
self = Test()
"""
defs = []
- for symbol, (code, args) in definitions.items():
- defs.append(str(code))
- args = ','.join(repr(arg) for arg in args)
- defs.append("self.%s = anonymous(%s)\n" % (symbol, args))
+ for symbol, value in definitions.items():
+ if isinstance(value, tuple) and isinstance(value[0], py.code.Source):
+ code, args = value
+ 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()
pyfile = udir.join('src.py')
source = helpers + '\n'.join(defs) + str(source)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit