]> granicus.if.org Git - python/commitdiff
make error msg more informative when test of exec fails
authorJeremy Hylton <jeremy@alum.mit.edu>
Fri, 19 Jan 2001 03:26:33 +0000 (03:26 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Fri, 19 Jan 2001 03:26:33 +0000 (03:26 +0000)
Lib/test/test_grammar.py

index 503cc80c0bf88d6587fa01ec767b726b905fcbbe..b64fcdf8ca819754ce29835e8e5eb5a986e69da2 100644 (file)
@@ -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