Commit a49d94af authored by Guido van Rossum's avatar Guido van Rossum

test for specific bug in vars()

parent 1d59df28
...@@ -238,6 +238,15 @@ b = dir(sys) ...@@ -238,6 +238,15 @@ b = dir(sys)
a.sort() a.sort()
b.sort() b.sort()
if a <> b: raise TestFailed, 'vars(sys)' if a <> b: raise TestFailed, 'vars(sys)'
def f0():
if vars() != {}: raise TestFailed, 'vars() in f0()'
f0()
def f2():
f0()
a = 1
b = 2
if vars() != {'a': a, 'b': b}: raise TestFailed, 'vars() in f2()'
f2()
print 'xrange' print 'xrange'
if tuple(xrange(10)) <> tuple(range(10)): raise TestFailed, 'xrange(10)' if tuple(xrange(10)) <> tuple(range(10)): raise TestFailed, 'xrange(10)'
......
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