mς %U²Ic@s‚dZdklZdkZeidddƒdd„ZdZeeƒd Zeeƒd Zeeƒd Z ee d ƒdS( sDVerify that warnings are issued for global statements following use.(s check_syntaxNterrortmodules icCsbyt|ddƒWn.tj o"}|o dGHq^dG|GHnX|o dG|GHndGHdS(Ns texecsgot SyntaxError as expectedsraised unexpected SyntaxError:sshould have raised SyntaxError:sas expected, no SyntaxError(tcompilettextt SyntaxErrortmsgt should_fail(RRR((t-/data/zmath/lib/python2.4/test/test_global.pytcompile_and_check s  s= def wrong1(): a = 1 b = 2 global a global b s( def wrong2(): print x global x s2 def wrong3(): print x x = 2 global x s global x x = 2 i( t__doc__ttest.test_supportt check_syntaxtwarningstfilterwarningsR t prog_text_1t prog_text_2t prog_text_3t prog_text_4(R RRRRR R ((Rt?s