def test_should_report_multiple_warnings_negative():
 expected = [('Variable a assigned before global declaration', 'global a', (-1), Warning), ('Variable b assigned before global declaration', 'global b', (-1), Warning)]
 code = 'def foo():\n  a=2\n  global a\n\ndef bar():\n  b=2\n  global b'
 AssertError(AssertionError, AreEqual, expected, compile_file(code))

def test_should_report_multiple_warnings_negative ( ) : expected = [ ( 'Variable a assigned before global declaration' , 'global a' , ( - 1 ) , Warning ) , ( 'Variable b assigned before global declaration' , 'global b' , ( - 1 ) , Warning ) ] code = 'def foo():\n  a=2\n  global a\n\ndef bar():\n  b=2\n  global b' AssertError ( AssertionError , AreEqual , expected , compile_file ( code ) )
bug #17541 .