mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
make error msg more informative when test of exec fails
This commit is contained in:
parent
047e2c93e2
commit
e1bb5f9814
1 changed files with 1 additions and 1 deletions
|
@ -380,7 +380,7 @@ l = {}
|
|||
exec 'global a; a = 1; b = 2' in g, l
|
||||
if g.has_key('__builtins__'): del g['__builtins__']
|
||||
if l.has_key('__builtins__'): del l['__builtins__']
|
||||
if (g, l) != ({'a':1}, {'b':2}): raise TestFailed, 'exec ... in g, l'
|
||||
if (g, l) != ({'a':1}, {'b':2}): raise TestFailed, 'exec ... in g (%s), l (%s)' %(g,l)
|
||||
|
||||
|
||||
### compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue