temporary checking towards 3.1 compatibility

introduced some helpers to py.builtin namespace which need some review
after things begin to work more nicely

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-08-28 19:16:15 +02:00
parent 5e95feaf90
commit 783e6aeb4d
33 changed files with 218 additions and 164 deletions

View File

@@ -93,14 +93,13 @@ def raises(ExpectedException, *args, **kwargs):
#print "raises frame scope: %r" % frame.f_locals
try:
code = py.code.Source(code).compile()
exec code in frame.f_globals, loc
py.builtin.exec_(code, frame.f_globals, loc)
# XXX didn'T mean f_globals == f_locals something special?
# this is destroyed here ...
except ExpectedException:
return py.code.ExceptionInfo()
else:
func = args[0]
assert callable
try:
func(*args[1:], **kwargs)
except ExpectedException: