Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e1bb5f9

Browse files
committed
make error msg more informative when test of exec fails
1 parent 047e2c9 commit e1bb5f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/test_grammar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def f():
380380
exec 'global a; a = 1; b = 2' in g, l
381381
if g.has_key('__builtins__'): del g['__builtins__']
382382
if l.has_key('__builtins__'): del l['__builtins__']
383-
if (g, l) != ({'a':1}, {'b':2}): raise TestFailed, 'exec ... in g, l'
383+
if (g, l) != ({'a':1}, {'b':2}): raise TestFailed, 'exec ... in g (%s), l (%s)' %(g,l)
384384

385385

386386
### compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef

0 commit comments

Comments
 (0)