mirror of https://github.com/python/cpython
style nits
This commit is contained in:
parent
27c4b39025
commit
cf29bb2aa9
|
@ -153,10 +153,14 @@ if eval('1+1') <> 2: raise TestFailed, 'eval(\'1+1\')'
|
|||
if eval(' 1+1\n') <> 2: raise TestFailed, 'eval(\' 1+1\\n\')'
|
||||
globals = {'a': 1, 'b': 2}
|
||||
locals = {'b': 200, 'c': 300}
|
||||
if eval('a', globals) <> 1: raise TestFailed, "eval(1)"
|
||||
if eval('a', globals, locals) <> 1: raise TestFailed, "eval(2)"
|
||||
if eval('b', globals, locals) <> 200: raise TestFailed, "eval(3)"
|
||||
if eval('c', globals, locals) <> 300: raise TestFailed, "eval(4)"
|
||||
if eval('a', globals) <> 1:
|
||||
raise TestFailed, "eval(1) == %s" % eval('a', globals)
|
||||
if eval('a', globals, locals) <> 1:
|
||||
raise TestFailed, "eval(2)"
|
||||
if eval('b', globals, locals) <> 200:
|
||||
raise TestFailed, "eval(3)"
|
||||
if eval('c', globals, locals) <> 300:
|
||||
raise TestFailed, "eval(4)"
|
||||
|
||||
print 'execfile'
|
||||
z = 0
|
||||
|
|
Loading…
Reference in New Issue