# bogus test of new.code()
print 'new.code()'
-d = new.code(3, 3, 3, 3, codestr, (), (), (),
+d = new.code(3, 3, 3, 3, codestr, (), (), (),
"<string>", "<name>", 1, "", (), ())
# test backwards-compatibility version with no freevars or cellvars
-d = new.code(3, 3, 3, 3, codestr, (), (), (),
+d = new.code(3, 3, 3, 3, codestr, (), (), (),
"<string>", "<name>", 1, "")
if verbose:
print d
print "8. mixed freevars and cellvars"
def identity(x):
- return x
+ return x
def f(x, y, z):
def g(a, b, c):
a = a + x # 3
def h():
- # z * (4 + 9)
- # 3 * 13
+ # z * (4 + 9)
+ # 3 * 13
return identity(z * (b + y))
y = c + z # 9
return h
g = f(1, 2, 3)
h = g(2, 4, 6)
-verify(h() == 39)
+verify(h() == 39)
print "9. free variable in method"
"""
# check_syntax(test2)
-# XXX could allow this for exec with const argument, but what's the point
+# XXX could allow this for exec with const argument, but what's the point
test3 = \
"""def error(y):
exec "a = 1"
pass
else:
raise TestFailed
-