mirror of https://github.com/python/cpython
Fix test for free ref to global. This test should have caught a
recently fixed bug, but it checked for the wrong answer.
This commit is contained in:
parent
ac25a38841
commit
251ef9666e
|
@ -86,7 +86,7 @@ def make_adder6(x):
|
||||||
inc = make_adder6(1)
|
inc = make_adder6(1)
|
||||||
plus10 = make_adder6(10)
|
plus10 = make_adder6(10)
|
||||||
|
|
||||||
verify(inc(1) == 2)
|
verify(inc(1) == 11) # there's only one global
|
||||||
verify(plus10(-2) == 8)
|
verify(plus10(-2) == 8)
|
||||||
|
|
||||||
print "7. nearest enclosing scope"
|
print "7. nearest enclosing scope"
|
||||||
|
|
Loading…
Reference in New Issue