style nits

This commit is contained in:
Jeremy Hylton 2000-08-23 21:11:05 +00:00
parent 27c4b39025
commit cf29bb2aa9
1 changed files with 8 additions and 4 deletions

View File

@ -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\')' if eval(' 1+1\n') <> 2: raise TestFailed, 'eval(\' 1+1\\n\')'
globals = {'a': 1, 'b': 2} globals = {'a': 1, 'b': 2}
locals = {'b': 200, 'c': 300} locals = {'b': 200, 'c': 300}
if eval('a', globals) <> 1: raise TestFailed, "eval(1)" if eval('a', globals) <> 1:
if eval('a', globals, locals) <> 1: raise TestFailed, "eval(2)" raise TestFailed, "eval(1) == %s" % eval('a', globals)
if eval('b', globals, locals) <> 200: raise TestFailed, "eval(3)" if eval('a', globals, locals) <> 1:
if eval('c', globals, locals) <> 300: raise TestFailed, "eval(4)" 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' print 'execfile'
z = 0 z = 0