Commit d645f780 authored by Tim Peters's avatar Tim Peters

Whitespace normalization.

parent 639e62a0
...@@ -156,13 +156,13 @@ else: raise TestFailed ...@@ -156,13 +156,13 @@ else: raise TestFailed
del another.func_defaults del another.func_defaults
def foo(): def foo():
pass pass
def bar(): def bar():
pass pass
def temp(): def temp():
print 1 print 1
if foo==bar: raise TestFailed if foo==bar: raise TestFailed
...@@ -172,4 +172,3 @@ d[foo] = 1 ...@@ -172,4 +172,3 @@ d[foo] = 1
foo.func_code = temp.func_code foo.func_code = temp.func_code
d[foo] d[foo]
...@@ -367,7 +367,7 @@ while not msg: ...@@ -367,7 +367,7 @@ while not msg:
finally: finally:
msg = "continue + try/finally ok" msg = "continue + try/finally ok"
print msg print msg
print 'return_stmt' # 'return' [testlist] print 'return_stmt' # 'return' [testlist]
def g1(): return def g1(): return
def g2(): return 1 def g2(): return 1
......
...@@ -66,10 +66,10 @@ verify(g['c'] == 3, ...@@ -66,10 +66,10 @@ verify(g['c'] == 3,
# bogus test of new.code() # bogus test of new.code()
print 'new.code()' print 'new.code()'
d = new.code(3, 3, 3, 3, codestr, (), (), (), d = new.code(3, 3, 3, 3, codestr, (), (), (),
"<string>", "<name>", 1, "", (), ()) "<string>", "<name>", 1, "", (), ())
# test backwards-compatibility version with no freevars or cellvars # 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, "") "<string>", "<name>", 1, "")
if verbose: if verbose:
print d print d
...@@ -105,14 +105,14 @@ verify(test_func(5) == 47) ...@@ -105,14 +105,14 @@ verify(test_func(5) == 47)
print "8. mixed freevars and cellvars" print "8. mixed freevars and cellvars"
def identity(x): def identity(x):
return x return x
def f(x, y, z): def f(x, y, z):
def g(a, b, c): def g(a, b, c):
a = a + x # 3 a = a + x # 3
def h(): def h():
# z * (4 + 9) # z * (4 + 9)
# 3 * 13 # 3 * 13
return identity(z * (b + y)) return identity(z * (b + y))
y = c + z # 9 y = c + z # 9
return h return h
...@@ -120,7 +120,7 @@ def f(x, y, z): ...@@ -120,7 +120,7 @@ def f(x, y, z):
g = f(1, 2, 3) g = f(1, 2, 3)
h = g(2, 4, 6) h = g(2, 4, 6)
verify(h() == 39) verify(h() == 39)
print "9. free variable in method" print "9. free variable in method"
...@@ -206,7 +206,7 @@ test2 = \ ...@@ -206,7 +206,7 @@ test2 = \
""" """
# check_syntax(test2) # 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 = \ test3 = \
"""def error(y): """def error(y):
exec "a = 1" exec "a = 1"
...@@ -275,4 +275,3 @@ except UnboundLocalError: ...@@ -275,4 +275,3 @@ except UnboundLocalError:
pass pass
else: else:
raise TestFailed raise TestFailed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment